diff --git a/app/views/layouts/rails_admin/_head.html.erb b/app/views/layouts/rails_admin/_head.html.erb
index d78e4366f..43ce0096d 100644
--- a/app/views/layouts/rails_admin/_head.html.erb
+++ b/app/views/layouts/rails_admin/_head.html.erb
@@ -2,6 +2,7 @@
+
<%= csrf_meta_tag %>
<% case RailsAdmin::config.asset_source
when :webpacker %>
diff --git a/spec/integration/rails_admin_spec.rb b/spec/integration/rails_admin_spec.rb
index 8040dcc82..26bb603f6 100644
--- a/spec/integration/rails_admin_spec.rb
+++ b/spec/integration/rails_admin_spec.rb
@@ -204,6 +204,13 @@
is_expected.to have_content 'Player failed to be updated'
is_expected.to have_css '.filtering-select[data-input-for="player_team_id"]'
end
+
+ it 'does not prefetch pages' do
+ allow_any_instance_of(RailsAdmin::Config::Actions::Index).to receive(:controller).and_raise('index prefetched')
+ visit dashboard_path
+ find('.sidebar a.nav-link[href$="/player"]').hover
+ sleep 0.3 # Turbo waits 100ms before prefetch
+ end
end
describe 'dom_ready events', js: true do