<commit_before>class RatingsController < ApplicationController
	before_action :set_rating, only: [:edit, :update, :destroy]

	# GET /professors/:professor_id/ratings
	def index
		@professor = Professor.find(params[:professor_id])
		@ratings = @professor.ratings
	end

	# GET /professors/:professor_id/ratings/new
	def new
		@professor = Professor.find(params[:professor_id])
		@rating = @professor.ratings.new
	end

	# GET /ratings/1/edit
	# set_ratings called
	def edit
	end

	# POST /professors/:professor_id/ratings
	def create
		@professor = Professor.find(params[:professor_id])
		@rating = @professor.ratings.new(rating_params)
		if @rating.save
			redirect_to professor_ratings_url(@professor), notice: 'Rating was successfully created.'
		else
			render :new
		end
	end

	# PUT/PATCH /ratings/1
	# set_ratings called
	def update
		if @ratings.update(rating_params)
			redirect_to professor_ratings_url(@professor), notice: 'Rating was successfully updated.'
		else
			render :edit
		end
	end

	# DELETE /ratings/1
	# set_ratings called
	def destroy
		@rating.destroy
		redirect_to professor_ratings_url(@rating.professor), notice: 'Rating was successfully destroyed.'
	end

	private
		def set_rating
			@rating = Rating.find(params[:id])
		end

		def rating_params
		end
end<commit_msg>Defined raing_params<commit_after>class RatingsController < ApplicationController
	before_action :set_rating, only: [:edit, :update, :destroy]

	# GET /professors/:professor_id/ratings
	def index
		@professor = Professor.find(params[:professor_id])
		@ratings = @professor.ratings
	end

	# GET /professors/:professor_id/ratings/new
	def new
		@professor = Professor.find(params[:professor_id])
		@rating = @professor.ratings.new
	end

	# GET /ratings/1/edit
	# set_ratings called
	def edit
	end

	# POST /professors/:professor_id/ratings
	def create
		@professor = Professor.find(params[:professor_id])
		@rating = @professor.ratings.new(rating_params)
		if @rating.save
			redirect_to professor_ratings_url(@professor), notice: 'Rating was successfully created.'
		else
			render :new
		end
	end

	# PUT/PATCH /ratings/1
	# set_ratings called
	def update
		if @ratings.update(rating_params)
			redirect_to professor_ratings_url(@professor), notice: 'Rating was successfully updated.'
		else
			render :edit
		end
	end

	# DELETE /ratings/1
	# set_ratings called
	def destroy
		@rating.destroy
		redirect_to professor_ratings_url(@rating.professor), notice: 'Rating was successfully destroyed.'
	end

	private
		def set_rating
			@rating = Rating.find(params[:id])
		end

		def rating_params
			params.require(:rating).permit(:course, :comment, :rating)
		end
end
{'fraction_non_alphanumeric': 0.10011290929619872, 'fraction_numerical': 0.002258185923974407, 'mean_word_length': 4.584033613445378, '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': '5105340', 'n_tokens_mistral': 1009, 'n_tokens_neox': 902, 'n_words': 205}