Roles into their own controller. Rework interface. Add flash messages to ajax calls. Add description to roles. Possible to edit roles in use.
This commit is contained in:
parent
eda5c2bc07
commit
ccd7ecbb90
59 changed files with 618 additions and 356 deletions
|
|
@ -1,9 +1,10 @@
|
|||
class Role < ActiveRecord::Base
|
||||
has_and_belongs_to_many :users
|
||||
belongs_to :resource, polymorphic: true
|
||||
has_and_belongs_to_many :users
|
||||
|
||||
scopify
|
||||
|
||||
LABELS = ['Attendee', 'Volunteer', 'Speaker', 'Sponsor', 'Press', 'Keynote Speaker']
|
||||
ACTIONABLES = ['Organizer', 'CfP', 'Info Desk', 'Volunteers Coordinator']
|
||||
validates :name, presence: true
|
||||
|
||||
validates :name, uniqueness: { scope: :resource }
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue