Skip to content

Commit

Permalink
add eager loading to make bullet happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fiveNinePlusR committed Sep 25, 2024
1 parent cca1c97 commit 3f310c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/locations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def index
end

def render_machines
machines = LocationMachineXref.where(location_id: params[:id]).includes(:machine)
machines = LocationMachineXref.where(location_id: params[:id]).includes(:machine, machine_score_xrefs: [:user])
machines = machines.sort { |a, b| a.machine.massaged_name <=> b.machine.massaged_name }
logged_in = current_user ? 'logged_in' : 'logged_out'

Expand Down

0 comments on commit 3f310c6

Please sign in to comment.