clarion/app/models/participant.rb
2019-04-28 22:02:02 +03:00

17 lines
314 B
Ruby

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