Skip to content

Commit

Permalink
ApplicationHelper import for use of feature method (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykl7 authored and jywarren committed Nov 29, 2016
1 parent 8cd8a3d commit 7c61897
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/mailers/subscription_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class SubscriptionMailer < ActionMailer::Base
helper :application
include ApplicationHelper
default from: "do-not-reply@#{ActionMailer::Base.default_url_options[:host]}"

def notify_node_creation(node)
Expand All @@ -8,6 +10,7 @@ def notify_node_creation(node)
@user = val[:user]
@node = node
@tags = val[:tags]
@footer = feature('email-footer')
mail(:to => val[:user].email, :subject => subject).deliver
end
end
Expand Down
2 changes: 2 additions & 0 deletions app/views/subscription_mailer/notify_node_creation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@

<p>Report spam and abuse to: <a href="mailto:moderators@<%= ActionMailer::Base.default_url_options[:host] %>">moderators@<%= ActionMailer::Base.default_url_options[:host] %></a></p>

<%= @footer %>

</div>

0 comments on commit 7c61897

Please sign in to comment.