<commit_before>class Event < ActiveRecord::Base
  belongs_to :user
	has_many :eventTags
	has_many :tags, through: :eventTags

  # validates :title, :presence => true
  # validates :description, :presence => true
  # validates :date, :presence => true
  # validates :time, :presence => true
end<commit_msg>Add Event model method created_by? for view layer usage<commit_after>class Event < ActiveRecord::Base
  belongs_to :user
	has_many :eventTags
	has_many :tags, through: :eventTags

  validates :user_id, :title, :description, :datetime, :city, :state, :zip, :location,
  	:presence => true
  validates :zip, length: { is: 5 }, numericality: { only_integer: true }

  def created_by?(user)
  	return true if self.user == user
  	return false
  end

end
{'fraction_non_alphanumeric': 0.11273209549071618, 'fraction_numerical': 0.001326259946949602, 'mean_word_length': 4.8076923076923075, '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': '4468954', 'n_tokens_mistral': 249, 'n_tokens_neox': 247, 'n_words': 76}