clarion/app/models/participant.rb

17 lines
313 B
Ruby
Raw Normal View History

2016-10-15 05:59:07 +03:00
class Participant < ActiveRecord::Base
self.table_name = :participants
self.primary_key = :participant_id
def twitter=(handle)
write_attribute :twitter, handle.gsub(/\A@/,'') if handle
end
def name
"#{first_name} #{last_name}"
end
def has_personal_profile?
user_id.present?
end
end