Commit c0a3b59
Refactor to use async: true for non-Redux pages
Instead of using defer: true globally, the layout now conditionally
uses async: true for optimal performance on pages without Redux shared
stores, and defer: true only for pages that need it.
Changes:
- Added uses_redux_shared_store? helper method to ApplicationController
- Updated layout to conditionally use async/defer based on page type
- Pages using Redux shared stores: defer: true (9 pages)
- All other pages: async: true (recommended approach)
Benefits:
- Modern pages get optimal TTI with async: true
- Redux pages still work correctly with defer: true
- Demonstrates best practice: use async unless you need defer
This allows CI to pass while maximizing async usage across the app.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 0e45b87 commit c0a3b59
File tree
2 files changed
+29
-5
lines changed- spec/dummy/app
- controllers
- views/layouts
2 files changed
+29
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
22 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
0 commit comments