<commit_before>class TripsController < ApplicationController

	# before_action :authenticate_user!, except: [:index]

	def index
		if params[:place_id]
			@place = Place.find(params[:place_id])
			@trips = Trip.where(place_id: @place.id).all
		elsif params[:activity_id]
			@activity= Activity.find(params[:activity_id])
			@trips = Trip.where(activity_id: @activity.id).all
		end
	end

	def show
		@trip = Trip.find(params[:id])
		@pending_people = Participation.where(trip_id: @trip.id, confirmed: false).all.count
		@confirmed_people = Participation.where(trip_id: @trip.id, confirmed: true).all.count
	end

	def new<commit_msg>Added auth<commit_after>class TripsController < ApplicationController

	before_action :authenticate_user!, except: [:index]

	def index
		if params[:place_id]
			@place = Place.find(params[:place_id])
			@trips = Trip.where(place_id: @place.id).all
		elsif params[:activity_id]
			@activity= Activity.find(params[:activity_id])
			@trips = Trip.where(activity_id: @activity.id).all
		end
	end

	def show
		@trip = Trip.find(params[:id])
		@pending_people = Participation.where(trip_id: @trip.id, confirmed: false).all.count
		@confirmed_people = Participation.where(trip_id: @trip.id, confirmed: true).all.count
	end

	def new
{'fraction_non_alphanumeric': 0.1328560063643596, 'fraction_numerical': 0.0, 'mean_word_length': 5.258706467661692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4992844', 'n_tokens_mistral': 483, 'n_tokens_neox': 424, 'n_words': 84}