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

Installer: don't add main in existing projects #146

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

shafy
Copy link
Contributor

@shafy shafy commented Feb 20, 2022

This addresses and closes #139.

Currently, the installer adds a <main> element around <%= yield %> in application.html.erb. This is ok for new projects, but it's annoying for projects that add this gem later on since they likely already have changed their application.html.erb and installing the gem breaks the layout.

This proposed change first checks if application.html.erb looks standard around <%= yield %>, and only in that case wraps it in a <main> element.

@dixpac
Copy link
Contributor

dixpac commented Feb 22, 2022

I'm ok with this approach. But @dhh has the last word.

@dhh dhh merged commit 68499d2 into rails:main Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't add main element to application.html.erb
3 participants