2015-07-29 17:54:41 +03:00
|
|
|
class Participation < ActiveRecord::Base
|
|
|
|
belongs_to :participant, class_name: User
|
2016-10-15 05:59:07 +03:00
|
|
|
has_one :participant_with_personal_profile, class_name: Participant
|
2015-07-29 17:54:41 +03:00
|
|
|
belongs_to :event
|
2016-10-09 02:13:36 +03:00
|
|
|
validates :participant_id, presence: true
|
2015-07-29 17:54:41 +03:00
|
|
|
scope :approved, ->() { where approved: true }
|
|
|
|
scope :pending, ->() { where.not approved: true }
|
|
|
|
end
|