We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d94bbe commit 21bfe69Copy full SHA for 21bfe69
lib/generators/rspec/mailer/templates/preview.rb
@@ -5,7 +5,7 @@ class <%= class_name %>Preview < ActionMailer::Preview
5
6
# Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %>
7
def <%= action %>
8
- <%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= action %>
+ <%= Rails.version.to_f >= 5.0 ? class_name.sub(/(Mailer)?$/, 'Mailer') : class_name %>.<%= action %>
9
end
10
<% end -%>
11
0 commit comments