Skip to content
Snippets Groups Projects
Commit 246951bb authored by http://jneen.net/'s avatar http://jneen.net/
Browse files

unmemoize read_ability

since it's only called once now in make_recipient
parent 934305ff
No related branches found
No related tags found
Loading
Loading
Loading
@@ -87,13 +87,12 @@ module NotificationRecipientService
end
 
def read_ability
@read_ability ||=
case target
when Issuable
:"read_#{target.to_ability_name}"
when Ci::Pipeline
:read_build # We have build trace in pipeline emails
end
case target
when Issuable
:"read_#{target.to_ability_name}"
when Ci::Pipeline
:read_build # We have build trace in pipeline emails
end
end
 
def custom_action
Loading
Loading
@@ -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!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment