From cb47b9da99ae85fc8ba2576a07c9cf250f8aa80e Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Fri, 27 Mar 2026 12:25:27 -0700 Subject: [PATCH] refactor: update rankings action to pass current_player Refactor rankings action to use render_with_player helper for consistent current_player availability across views. Changes: - Update rankings action to use render_with_player - Ensure current_player is available in all view templates --- app/actions/players/rankings.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/actions/players/rankings.rb b/app/actions/players/rankings.rb index 0d09ba9..5d95ae5 100644 --- a/app/actions/players/rankings.rb +++ b/app/actions/players/rankings.rb @@ -6,10 +6,10 @@ module EuchreCamp class Rankings < EuchreCamp::Action include Deps[repo: 'repositories.players'] - def handle(_request, response) + def handle(request, response) # Get all players and sort by current Elo players = repo.all.sort_by { |p| -p.current_elo } - response.render(view, players: players) + render_with_player(request, response, players: players) end end end