Move attach_project_logo to be its own before_action filter, as suggested
authorHerve Saint-Amand <git@saintamh.org>
Mon, 16 Jan 2017 21:21:55 +0000 (21:21 +0000)
committerHerve Saint-Amand <git@saintamh.org>
Mon, 16 Jan 2017 21:21:55 +0000 (21:21 +0000)
app/models/notifier.rb

index 8e386edf84bbcfe2baf78f9c3fc58f91608f2b88..0ed7071ac770ebb6d60a7ccf09abce56ed84d8ca 100644 (file)
@@ -4,6 +4,7 @@ class Notifier < ActionMailer::Base
           :auto_submitted => "auto-generated"
   helper :application
   before_action :set_shared_template_vars
+  before_action :attach_project_logo
 
   def signup_confirm(user, token)
     with_recipient_locale user do
@@ -191,7 +192,6 @@ class Notifier < ActionMailer::Base
 
   def set_shared_template_vars
     @root_url = root_url(:host => SERVER_URL)
-    attach_project_logo
   end
 
   def attach_project_logo