Refactor topics controller. Add Common abilities. Add destroy action.
This commit is contained in:
@@ -71,6 +71,9 @@ module Abilities
|
||||
|
||||
can :create, Annotation
|
||||
can [:update, :destroy], Annotation, user_id: user.id
|
||||
|
||||
can [:create], Topic
|
||||
can [:update, :destroy], Topic, author_id: user.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user