From 4cbac13df1dce580e18ae80b7f9cc142a5af6e3a Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Wed, 20 Nov 2024 10:44:33 -0800 Subject: [PATCH] Remove careful SQL-selecting on homepage This keeps causing missing-attribute crashes when I change things, and I don't think the performance benefit is a big deal for how the page currently runs, esp as we keep gathering more attributes? I feel like `description` is the main "large" one we're omitting, and like. Shrug! --- app/controllers/outfits_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/outfits_controller.rb b/app/controllers/outfits_controller.rb index 08e941be..97ca9cb8 100644 --- a/app/controllers/outfits_controller.rb +++ b/app/controllers/outfits_controller.rb @@ -50,11 +50,7 @@ class OutfitsController < ApplicationController @colors = Color.alphabetical @species = Species.alphabetical - newest_items = Item.newest. - select(:id, :name, :created_at, :updated_at, :thumbnail_url, - :rarity_index, :is_manually_nc, :cached_compatible_body_ids, - :cached_predicted_fully_modeled) - .limit(18) + newest_items = Item.newest.limit(18) @newest_modeled_items, @newest_unmodeled_items = newest_items.partition(&:predicted_fully_modeled?)