From 7a9ab64d75145c6676f3350746c1ba31ded54bc6 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Fri, 16 Feb 2024 23:22:41 -0800 Subject: [PATCH] Allow modeling pets for colors we haven't gotten metadata for yet This used to be the behavior, and the site has plenty of graceful fallbacks for it, I just forgot this one when doing Rails upgrades! Note that the impress-2020 stuff is *not* as graceful about this, so the wardrobe page won't show the pet until the color is in the DB. Ah well, still an improvement! --- app/models/pet.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/pet.rb b/app/models/pet.rb index 6e2d6c2c..ca4637a7 100644 --- a/app/models/pet.rb +++ b/app/models/pet.rb @@ -86,8 +86,8 @@ class Pet < ApplicationRecord def wardrobe_query { name: self.name, - color: self.pet_type.color.id, - species: self.pet_type.species.id, + color: self.pet_type.color_id, + species: self.pet_type.species_id, pose: self.pet_state.pose, state: self.pet_state.id, objects: self.items.map(&:id),