add unfollow_from_email to the policies
This commit is contained in:
parent
2c85590d65
commit
9ce989eba5
2 changed files with 8 additions and 0 deletions
|
@ -98,4 +98,8 @@ class MapPolicy < ApplicationPolicy
|
|||
def unfollow?
|
||||
user.present?
|
||||
end
|
||||
|
||||
def unfollow_from_email?
|
||||
user.present?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -63,6 +63,10 @@ class TopicPolicy < ApplicationPolicy
|
|||
user.present?
|
||||
end
|
||||
|
||||
def unfollow_from_email?
|
||||
user.present?
|
||||
end
|
||||
|
||||
# Helpers
|
||||
def map_policy
|
||||
@map_policy ||= Pundit.policy(user, record.defer_to_map)
|
||||
|
|
Loading…
Reference in a new issue