<commit_before>class ContactsController < ContactUs::ContactsController	
	def create
		@contact = ContactUs::Contact.new(params[:contact_us_contact])
		if @contact.save
			flash[:notice] = t('contact_us.notices.success')
			if user_signed_in? then
		  		redirect_to :controller => 'projects', :action => 'index'
		  	else
		  		redirect_to(root_path)
		  	end
		else
		  	flash[:error] = t('contact_us.notices.error')
		  	render_new_page
		end
	end
end<commit_msg>Added recaptcha validation<commit_after>class ContactsController < ContactUs::ContactsController	
	def create
		@contact = ContactUs::Contact.new(params[:contact_us_contact])
		if verify_recaptcha(:message => "You have not added the validation words correctly") && @contact.save
			flash[:notice] = t('contact_us.notices.success')
			if user_signed_in? then
		  		redirect_to :controller => 'projects', :action => 'index'
		  	else
		  		redirect_to(root_path)
		  	end
		else
		  	flash[:error] = t('contact_us.notices.error')
		  	render_new_page
		end
	end
end
{'fraction_non_alphanumeric': 0.10992217898832685, 'fraction_numerical': 0.0, 'mean_word_length': 4.359375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1351820', 'n_tokens_mistral': 376, 'n_tokens_neox': 334, 'n_words': 68}