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

Add a default yield :head to layouts/application.html.erb #50527

Merged
merged 3 commits into from
Jan 2, 2024

Conversation

dhh
Copy link
Member

@dhh dhh commented Jan 1, 2024

Good pattern that most applications should be using. It allows templates rendered inside of the application layout to add tags to the head. Like additional meta tags. Used by turbo-rails, for example.

Good pattern that most applications should be using.
@rails-bot rails-bot bot added the railties label Jan 1, 2024
@dhh
Copy link
Member Author

dhh commented Jan 2, 2024

Unrelated flaky test failures.

@dhh dhh merged commit c57b2cd into main Jan 2, 2024
6 of 7 checks passed
@dhh dhh deleted the yield-head-in-application branch January 2, 2024 11:16
dhh added a commit to skipkayhil/rails that referenced this pull request Jan 2, 2024
* main:
  Add a default yield :head to layouts/application.html.erb (rails#50527)
  Switch to new enum syntax in example code [ci-skip]
  Utilize new enum syntax
  Apply autocorrection by RuboCop to files generated by `bin/rails generate` (rails#50506)
  Add brakeman as development dependency
  Fix skipped rubocop test typo (rails#50519)
  Update the puma startup message
  docs: remove unneeded whitespace from start of code blocks
  Add changelog entry for rails#50512
  Remove unnecessary require
  Fix railspect not validating alphabetical order
seanpdoyle added a commit to seanpdoyle/rails that referenced this pull request May 4, 2024
Follow up to [rails#50527][]

Highlight the presence of the `yield :head` pattern established by
`turbo-rails` and adopted by Rails as part of [rails#50527][].

New applications will generate their application layout with `yield
:head`, so mention that in the documentation.

Also include the `yield :head` call in generated plugin layouts.

[rails#50527]: rails#50527
seanpdoyle added a commit to seanpdoyle/rails that referenced this pull request May 6, 2024
Follow up to [rails#50527][]

Highlight the presence of the `yield :head` pattern established by
`turbo-rails` and adopted by Rails as part of [rails#50527][].

New applications will generate their application layout with `yield
:head`, so mention that in the documentation.

Also include the `yield :head` call in generated plugin layouts.

[rails#50527]: rails#50527
seanpdoyle added a commit to seanpdoyle/rails that referenced this pull request May 6, 2024
Follow up to [rails#50527][]

Highlight the presence of the `yield :head` pattern established by
`turbo-rails` and adopted by Rails as part of [rails#50527][].

New applications will generate their application layout with `yield
:head`, so mention that in the documentation.

Also include the `yield :head` call in generated plugin layouts.

[rails#50527]: rails#50527
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

1 participant