diff --git a/app/models/item.rb b/app/models/item.rb index bcb4dfb7..803bfb87 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -187,11 +187,15 @@ class Item < ActiveRecord::Base def supported_species body_ids = swf_assets.select([:body_id]).map(&:body_id) + return Species.all if body_ids.include?(0) pet_types = PetType.where(:body_id => body_ids).select([:species_id]) species_ids = pet_types.map(&:species_id).uniq - Species.find(species_ids) + + # If there are multiple known supported species, it probably supports them + # all. (I've never heard of only a handful of species being supported :P) + species_ids.size > 1 ? Species.all : Species.find(species_ids) end def support_species?(species)