From ae9b690536de16f16fc2d29cd415da5c2a57a9a9 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 7 Mar 2013 19:31:49 -0600 Subject: [PATCH] assets that fit a special color can also have body_id == 0 The Baby Floor Gym, in particular, seems to have body_id == 0, but is only for Baby pets. This commit unbreaks that item --- app/models/swf_asset.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index f123eab0..5dfdeed2 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -162,6 +162,7 @@ class SwfAsset < ActiveRecord::Base scope :fitting_color, lambda { |color| body_ids = PetType.select(:body_id).where(:color_id => color.id).map(&:body_id) + body_ids << 0 where(arel_table[:body_id].in(body_ids)) }