Skip to content

Commit 8b18bbe

Browse files
committed
removed rails 5.0 check for mailer preview generator
1 parent 2d94bbe commit 8b18bbe

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 %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= action %>
8+
<%= Rails.version.to_f >= 5.0 ? class_name.sub(/(Mailer)?$/, 'Mailer') : class_name %>.<%= action %>
99
end
1010
<% end -%>
1111

0 commit comments

Comments
 (0)