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:
parent
cc4e2904a1
commit
ae9b690536
1 changed files with 1 additions and 0 deletions
|
@ -162,6 +162,7 @@ class SwfAsset < ActiveRecord::Base
|
||||||
|
|
||||||
scope :fitting_color, lambda { |color|
|
scope :fitting_color, lambda { |color|
|
||||||
body_ids = PetType.select(:body_id).where(:color_id => color.id).map(&:body_id)
|
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))
|
where(arel_table[:body_id].in(body_ids))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue