pundit: convert favorites to pundit.
This commit is contained in:
9
app/policies/favorite_policy.rb
Normal file
9
app/policies/favorite_policy.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class FavoritePolicy < ApplicationPolicy
|
||||
def create?
|
||||
user.is_member?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
user.is_member?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user