<commit_before>class AdoptersController < ApplicationController

	before_filter :authenticate, :except => [:new, :create]
	before_filter :admin_user,   :only => [:destroy]


  def index
    @title = "Adoption Applications"
    @adopters = Adopter.paginate(:page => params[:page])
  end

  def show
    @adopter = Adopter.find(params[:id])
    @title = @adopter.name
  end

	def new
		@adopter = Adopter.new
		@adopter.adoption_app = AdoptionApp.new
		3.times do
			@adopter.references.build
		end
	end

	def create
		@adopter = Adopter.new(params[:adopter])
		@adopter.status = 'pending'

		@adopter.dogs.each do |d|
			d.adoptions.each do |a|
				a.relation_type = 'interested'
			end
		end

		if @adopter.save
			flash[:success] = "Adopter Created"
			redirect_to root_path
		else
			render 'new'
		end
	end
end<commit_msg>type set correctly<commit_after>class AdoptersController < ApplicationController

	before_filter :authenticate, :except => [:new, :create]
	before_filter :admin_user,   :only => [:destroy]


  def index
    @title = "Adoption Applications"
    @adopters = Adopter.paginate(:page => params[:page])
  end

  def show
    @adopter = Adopter.find(params[:id])
    @title = @adopter.name
  end

	def new
		@adopter = Adopter.new
		@adopter.adoption_app = AdoptionApp.new
		3.times do
			@adopter.references.build
		end
	end

	def create
		@adopter = Adopter.new(params[:adopter])
		@adopter.status = 'pending'

		if @adopter.save
			@adopter.adoptions.each do |a|
				a.relation_type = 'interested'
				a.save
			end
			flash[:success] = "Adopter Created"
			redirect_to root_path
		else
			render 'new'
		end
	end
end
{'fraction_non_alphanumeric': 0.11538461538461539, 'fraction_numerical': 0.001221001221001221, 'mean_word_length': 3.527624309392265, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2256398', 'n_tokens_mistral': 651, 'n_tokens_neox': 572, 'n_words': 134}