-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed rails 5.0 check for mailer preview generator #2037
Conversation
@@ -5,7 +5,7 @@ class <%= class_name %>Preview < ActionMailer::Preview | |||
|
|||
# Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %> | |||
def <%= action %> | |||
<%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= action %> | |||
<%= Rails.version.to_f >= 5.0 ? class_name.sub(/(Mailer)?$/, 'Mailer') : class_name %>.<%= action %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should have a spec for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll work on 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonRowe
I wrote test 😄
please review again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
21bfe69
to
5916abc
Compare
5916abc
to
6859dfe
Compare
* removed rails 5.0 check for mailer preview generator * Add test fot mailer generator
* removed rails 5.0 check for mailer preview generator * Add test fot mailer generator
* removed rails 5.0 check for mailer preview generator * Add test fot mailer generator
before
👎 SomeMailerMailer.some_message
after
👍 SomeMailer.some_message