1
0
Fork 0
forked from OpenNeo/impress

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
This commit is contained in:
Emi Matchu 2013-03-07 19:31:49 -06:00
parent cc4e2904a1
commit ae9b690536

View file

@ -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))
}