Skip to content

Commit 906e91a

Browse files
koenpuntSam Phippen
authored andcommitted
Add Mailer suffix for rails 5
This is the same fix as in the mailer template generator
1 parent 358054c commit 906e91a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/rspec/mailer/templates/preview.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class <%= class_name %>Preview < ActionMailer::Preview
55

66
# Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %>
77
def <%= action %>
8-
<%= class_name %>.<%= action %>
8+
<%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= action %>
99
end
1010
<% end -%>
1111

0 commit comments

Comments
 (0)