unmemoize read_ability

since it's only called once now in make_recipient
This commit is contained in:
http://jneen.net/ 2017-08-01 11:52:43 -07:00
parent 934305ffa3
commit 246951bba7

View file

@ -87,7 +87,6 @@ module NotificationRecipientService
end
def read_ability
@read_ability ||=
case target
when Issuable
:"read_#{target.to_ability_name}"
@ -308,7 +307,9 @@ module NotificationRecipientService
end
def read_ability
@read_ability ||= :"read_#{target.class.model_name.name.underscore}"
return nil if target.nil?
:"read_#{target.class.model_name.name.underscore}"
end
def build!