diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb index 447f941f01..e53df04ce1 100644 --- a/spec/dummy/app/controllers/application_controller.rb +++ b/spec/dummy/app/controllers/application_controller.rb @@ -19,23 +19,4 @@ class ApplicationController < ActionController::Base redirect_to server_side_log_throw_raise_invoker_path, flash: { error: msg } end - - helper_method :uses_redux_shared_store? - - # Returns true if the current page uses Redux shared stores with inline registration - # These pages require defer: true instead of async: true for proper script execution order - def uses_redux_shared_store? - # Pages that use redux_store helper with inline component registration - action_name.in?(%w[ - index - server_side_redux_app - server_side_redux_app_cached - server_side_hello_world_shared_store - server_side_hello_world_shared_store_defer - server_side_hello_world_shared_store_controller - client_side_hello_world_shared_store - client_side_hello_world_shared_store_defer - client_side_hello_world_shared_store_controller - ]) - end end diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb index 0e25174d52..7208a82bcc 100644 --- a/spec/dummy/app/views/layouts/application.html.erb +++ b/spec/dummy/app/views/layouts/application.html.erb @@ -9,16 +9,7 @@ <%= yield :head %> - <%# Conditionally use defer: true for pages with Redux shared stores (inline registration). - Modern apps should use async: true for optimal performance. See docs for details: - docs/building-features/streaming-server-rendering.md %> - <% if uses_redux_shared_store? %> - <%# defer: true required for Redux shared stores with inline component registration %> - <%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', defer: true) %> - <% else %> - <%# async: true is the recommended approach for modern apps (Shakapacker >= 8.2.0) %> - <%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', async: true) %> - <% end %> + <%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', defer: true) %> <%= csrf_meta_tags %>