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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
class Topic < ActiveRecord::Base
|
||||
include Flaggable
|
||||
|
||||
acts_as_paranoid column: :hidden_at
|
||||
include ActsAsParanoidAliases
|
||||
|
||||
|
||||
Reference in New Issue
Block a user