Introduce Booths to OSEM

This commit is contained in:
nasia 2017-05-17 13:31:27 +03:00
parent 4d895ae3bc
commit 66ac45efc8
15 changed files with 268 additions and 1 deletions

View file

@ -50,11 +50,13 @@ class User < ActiveRecord::Base
has_many :votes, dependent: :destroy
has_many :voted_events, through: :votes, source: :events
has_many :subscriptions, dependent: :destroy
has_many :booth_requests
has_many :booths, through: :users_booths
accepts_nested_attributes_for :roles
scope :admin, -> { where(is_admin: true) }
scope :active, -> { where(is_disabled: false) }
validates :email, presence: true
validates :username,