Skip to content
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

generate mailer layout files if it does not already exist #25004

Conversation

y-yagi
Copy link
Member

@y-yagi y-yagi commented May 13, 2016

Currently, if ApplicationMailer does not exist, it is generated when
run the mailer generator, but layouts files does not generate.
However, because it uses the layouts in ApplicationMailer,
layouts are required.

Follow up to #24161

@rails-bot
Copy link

r? @eileencodes

(@rails-bot has picked a reviewer for you, use r? to override)

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Email styles need to be inline */
</style>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think adding empty style tags is necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layout file of new rails app contains empty style tags.
https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt#L5..L7

Should not make it the same?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine then, I didn't see that one. 👍

Currently, if `ApplicationMailer` does not exist, it is generated when
run the mailer generator, but layouts files does not generate.
However, because it uses the layouts in `ApplicationMailer`,
layouts are required.

Follow up to rails#24161
@y-yagi y-yagi force-pushed the generate_mailer_layout_files_if_it_does_not_already_exist branch from 393007a to f0f4cb2 Compare May 14, 2016 23:12
@y-yagi y-yagi closed this May 16, 2016
@y-yagi y-yagi reopened this May 16, 2016
@eileencodes eileencodes merged commit 39fa2c5 into rails:master Jun 12, 2016
@y-yagi y-yagi deleted the generate_mailer_layout_files_if_it_does_not_already_exist branch June 12, 2016 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants