Skip to content

Commit 58846b0

Browse files
committed
fix: update stimulus_layout to use auto-registration pattern
- Remove reference to non-existent client-bundle - Use append_ helpers for stimulus-bundle - Add final pack tags at end of body for React components - Matches the pattern used in application.html.erb
1 parent 351824b commit 58846b0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

app/views/layouts/stimulus_layout.html.erb

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

8-
<%= stylesheet_pack_tag('client-bundle',
9-
media: 'all',
10-
'data-turbolinks-track': true) %>
11-
12-
<%= javascript_pack_tag('stimulus-bundle',
13-
'data-turbolinks-track': true,
14-
defer: true) %>
8+
<%= append_stylesheet_pack_tag('stimulus-bundle') %>
9+
<%= append_javascript_pack_tag('stimulus-bundle') %>
1510

1611
<%= csrf_meta_tags %>
1712
</head>
@@ -23,6 +18,9 @@
2318
</div>
2419

2520
<%= react_component "Footer" %>
21+
22+
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
23+
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
2624
</body>
2725
</html>
2826

0 commit comments

Comments
 (0)