clarion/app/models/participant.rb

17 lines
314 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)
2019-04-28 21:10:54 +03:00
write_attribute :twitter, handle.gsub(/\A@/, "") if handle
2016-10-15 05:59:07 +03:00
end
def name
"#{first_name} #{last_name}"
end
def has_personal_profile?
user_id.present?
end
end