Commit 246951bb authored by http://jneen.net/'s avatar http://jneen.net/

unmemoize read_ability

since it's only called once now in make_recipient
parent 934305ff
...@@ -87,7 +87,6 @@ module NotificationRecipientService ...@@ -87,7 +87,6 @@ module NotificationRecipientService
end end
def read_ability def read_ability
@read_ability ||=
case target case target
when Issuable when Issuable
:"read_#{target.to_ability_name}" :"read_#{target.to_ability_name}"
...@@ -308,7 +307,9 @@ module NotificationRecipientService ...@@ -308,7 +307,9 @@ module NotificationRecipientService
end end
def read_ability 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 end
def build! def build!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment