Compare commits

..

2 commits

Author SHA1 Message Date
09e5a39b4c Whoops, fix alt styles when modeling real pets wearing them
Just never did this, I guess!! 😅
2024-10-18 19:16:41 -07:00
bf20c9bb31 Ah beans, I goofed alt style modeling *again*
Feeling for-real about getting a test suite set up because oh my god
2024-10-18 19:01:26 -07:00
2 changed files with 2 additions and 1 deletions

View file

@ -90,7 +90,7 @@ class AltStyle < ApplicationRecord
) )
DEFAULT_THUMBNAIL_URL = "https://images.neopets.com/items/mall_bg_circle.gif" DEFAULT_THUMBNAIL_URL = "https://images.neopets.com/items/mall_bg_circle.gif"
def infer_thumbnail_url def infer_thumbnail_url
if has_real_series_name? if real_series_name?
self.thumbnail_url = THUMBNAIL_URL_TEMPLATE.expand( self.thumbnail_url = THUMBNAIL_URL_TEMPLATE.expand(
series: series_name.gsub(/\s+/, '').downcase, series: series_name.gsub(/\s+/, '').downcase,
color: color.name.gsub(/\s+/, '').downcase, color: color.name.gsub(/\s+/, '').downcase,

View file

@ -78,6 +78,7 @@ class Pet < ApplicationRecord
pose: self.pet_state.pose, pose: self.pet_state.pose,
state: self.pet_state.id, state: self.pet_state.id,
objects: self.items.map(&:id), objects: self.items.map(&:id),
style: self.alt_style ? self.alt_style.id : nil,
}.to_query }.to_query
end end