Introduce Booths for admin
This commit is contained in:
parent
29aee82a14
commit
f7c0b64eb5
22 changed files with 534 additions and 1 deletions
|
|
@ -56,6 +56,9 @@ class User < ActiveRecord::Base
|
|||
has_many :voted_events, through: :votes, source: :events
|
||||
has_many :subscriptions, dependent: :destroy
|
||||
has_many :tracks, foreign_key: 'submitter_id'
|
||||
has_many :booth_requests
|
||||
has_many :booth_requests, dependent: :destroy
|
||||
has_many :booths, through: :booth_requests
|
||||
accepts_nested_attributes_for :roles
|
||||
|
||||
scope :admin, -> { where(is_admin: true) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue