add unfollow_from_email to the policies

This commit is contained in:
Connor Turland 2017-02-16 14:01:22 +00:00
parent 2c85590d65
commit 9ce989eba5
2 changed files with 8 additions and 0 deletions

View file

@ -98,4 +98,8 @@ class MapPolicy < ApplicationPolicy
def unfollow?
user.present?
end
def unfollow_from_email?
user.present?
end
end

View file

@ -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)