clarion/app/models/participation.rb
Petko Bordjukov 9ca34c5a22 Introduce a Participation model
This model is responsible for the 1..n - 1..n relationship between an
event and the people that will participate in it.
2015-07-31 14:40:04 +03:00

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