clarion/app/models/volunteership.rb

19 lines
369 B
Ruby
Raw Normal View History

class Volunteership < ActiveRecord::Base
include Proposable
belongs_to :volunteer_team
2019-04-28 21:10:54 +03:00
belongs_to :volunteer, class_name: "User"
has_one :conference, through: :volunteer_team
def proposable_title
volunteer.email
end
def proposable_description
{
volunteer_email: volunteer.email,
volunteer_team: volunteer_team.name,
}
end
end