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:
Stella 2015-01-12 23:13:10 +02:00 committed by Stella Rouzi
parent eda5c2bc07
commit ccd7ecbb90
59 changed files with 618 additions and 356 deletions

View file

@ -9,6 +9,13 @@ FactoryGirl.define do
end_date { 6.days.from_now }
registration_limit 0
after(:create) do |conference|
Role.where(name: 'organizer', resource: conference).first_or_create(description: 'For the organizers of the conference (who shall have full access)')
Role.where(name: 'cfp', resource: conference).first_or_create(description: 'For the members of the CfP team')
Role.where(name: 'info_desk', resource: conference).first_or_create(description: 'For the members of the Info Desk team')
Role.where(name: 'volunteers_coordinator', resource: conference).first_or_create(description: 'For the people in charge of volunteers')
end
factory :full_conference do
splashpage
registration_period

View file

@ -1,5 +1,6 @@
FactoryGirl.define do
factory :role do
name 'my role'
factory :organizer_role do
name 'organizer'

View file

@ -19,9 +19,5 @@ FactoryGirl.define do
factory :admin do
is_admin true
end
factory :organizer do
after(:create) { |user| user.role_ids = create(:organizer_role).id }
end
end
end