clarion/app/models/participation.rb
2016-10-09 02:40:05 +03:00

8 lines
254 B
Ruby

class Participation < ActiveRecord::Base
belongs_to :participant, class_name: User
belongs_to :event
validates :participant_id, presence: true
scope :approved, ->() { where approved: true }
scope :pending, ->() { where.not approved: true }
end