Skip to content

Commit e3b0b70

Browse files
committed
Attempt: Move append calls to head with yield for view-specific packs
1 parent 63fea2d commit e3b0b70

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app/views/layouts/application.html.erb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>RailsReactTutorial</title>
77

8-
<%= yield :head %>
8+
<%= append_stylesheet_pack_tag('stimulus-bundle') %>
9+
<%= append_javascript_pack_tag('stimulus-bundle') %>
10+
<%= append_javascript_pack_tag('stores-registration') %>
11+
<%= yield :packs %>
912
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
1013
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
1114

1215
<%= csrf_meta_tags %>
1316
</head>
1417
<body class="min-h-screen flex flex-col bg-sky-50 text-gray-700">
15-
<% content_for :head do %>
16-
<%= append_stylesheet_pack_tag('stimulus-bundle') %>
17-
<%= append_javascript_pack_tag('stimulus-bundle') %>
18-
<%= append_javascript_pack_tag('stores-registration') %>
19-
<% end %>
20-
2118
<%= react_component "NavigationBarApp" %>
2219

2320
<div class="container mx-auto px-4 flex-grow">

0 commit comments

Comments
 (0)