<commit_before># == Schema Information
#
# Table name: restaurants
#
#  id                :integer          not null, primary key
#  nom               :string(255)
#  created_at        :datetime
#  updated_at        :datetime
#  mock_restaurateur :string(255)
#

class Restaurant < ActiveRecord::Base
	before_validation :nilify_restaurateur
	RESTAURATEURS = %w(<NAME> jack mike mobby)

	def restaurateur
		mock_restaurateur
	end
private

	def nilify_restaurateur
		self.mock_restaurateur = nil if mock_restaurateur.blank?
	end
end<commit_msg>ADD : validation for restaurant name<commit_after># == Schema Information
#
# Table name: restaurants
#
#  id                :integer          not null, primary key
#  nom               :string(255)
#  created_at        :datetime
#  updated_at        :datetime
#  mock_restaurateur :string(255)
#

class Restaurant < ActiveRecord::Base
	before_validation :nilify_restaurateur
	RESTAURATEURS = %w(<NAME> jack mike mobby)

	## Validations ##

	validates :nom, presence: true

	def restaurateur
		mock_restaurateur
	end
private

	def nilify_restaurateur
		self.mock_restaurateur = nil if mock_restaurateur.blank?
	end
end
{'fraction_non_alphanumeric': 0.07586206896551724, 'fraction_numerical': 0.010344827586206896, 'mean_word_length': 3.284132841328413, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5866254', 'n_tokens_mistral': 388, 'n_tokens_neox': 361, 'n_words': 94}