Merge branch 'adding_surveys' of https://github.com/mdeniz/osem into mdeniz-adding_surveys

This commit is contained in:
Henne Vogelsang 2016-07-01 10:32:07 +02:00
commit 1991f53f26
40 changed files with 694 additions and 33 deletions

View file

@ -94,6 +94,9 @@ class Ability
# can manage the commercials of their own events
can :manage, Commercial, commercialable_type: 'Event', commercialable_id: user.events.pluck(:id)
# can view and reply a survey
can [:show, :reply], Survey, surveyable_type: 'Conference', surveyable_id: user.registrations.pluck(:conference_id)
end
# Abilities for signed in users with roles