-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate turbo meta tag generation from provides
This makes it possible to use the meta tag helpers from outside Rails rendering, such as an app built entirely from Phlex components. More importantly, this removes the requirement to have a `content_for :head` tag in the head of the Rails application. Instead the developer just adds the `turbo_meta_tags(method: :morph, scroll: :preserve)` to the top of their pages and it will setup the `yield :turbo_head` block that the helpers provide via `provide :turbo_head`.
- Loading branch information
1 parent
4eb4e92
commit 08bf75d
Showing
5 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<html> | ||
<head> | ||
<%= yield :head %> | ||
<%= turbo_meta_tags %> | ||
</head> | ||
<body> | ||
<%= yield %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<% content_for :head do %> | ||
<% content_for :turbo_head do %> | ||
<meta name="test" content="present" /> | ||
<% end %> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters