From 0305817cecd21b213dab8a5e80531699348da3f1 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Thu, 5 Sep 2024 17:39:47 -0700 Subject: [PATCH] Use fewer SQL queries to get species for species face picker --- app/controllers/items_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index cadb19c1..649a4aa2 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -95,7 +95,7 @@ class ItemsController < ApplicationController sort_by { |z, a| z.label } @preview_pet_type_options = PetType.where(color: @preview_outfit.color). - joins(:species).merge(Species.alphabetical) + includes(:species).merge(Species.alphabetical) end format.gif do