move subscribe to its own controller, add authorization, test subscribe/unsubscribe

This commit is contained in:
Stella 2014-10-31 22:45:15 +02:00 committed by Stella Rouzi
parent 97bf86454e
commit 3be200abcc
7 changed files with 92 additions and 43 deletions

View file

@ -129,6 +129,9 @@ class Ability
def signed_in(user)
guest # Inherits abilities of guest
# Can subscribe, unsubscribe to a conference
can [:create, :destroy], Subscription, user_id: user.id
# Conference Registration
can :manage, Registration, user_id: user.id