9ca34c5a22
This model is responsible for the 1..n - 1..n relationship between an event and the people that will participate in it.
8 lines
211 B
Ruby
8 lines
211 B
Ruby
class Participation < ActiveRecord::Base
|
|
belongs_to :participant, class_name: User
|
|
belongs_to :event
|
|
|
|
scope :approved, ->() { where approved: true }
|
|
scope :pending, ->() { where.not approved: true }
|
|
end
|