diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index d8e90fd1..e9a56db7 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -67,14 +67,9 @@ class ItemsController < ApplicationController @contributors_with_counts = @item.contributors_with_counts - @supported_species_ids = @item.supported_species_ids - @basic_colored_pet_types_by_species_id = PetType.special_color_or_basic(@item.special_color). - includes_child_translations.group_by(&:species) - trading_closet_hangers = @item.closet_hangers.trading.includes(:user). user_is_active.order('users.last_trade_activity_at DESC') - owned_trading_hangers = trading_closet_hangers.filter { |c| c.owned? } wanted_trading_hangers = trading_closet_hangers.filter { |c| c.wanted? } diff --git a/app/models/item.rb b/app/models/item.rb index c5d3e43c..8b3a8ee5 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -278,17 +278,6 @@ class Item < ApplicationRecord write_attribute('species_support_ids', replacement) end - def supported_species_ids - return Species.select([:id]).map(&:id) if modeled_body_ids.include?(0) - - pet_types = PetType.where(:body_id => modeled_body_ids).select('DISTINCT species_id') - species_ids = pet_types.map(&:species_id) - - # 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 >= 2 ? Species.select([:id]).map(&:id) : species_ids - end - def support_species?(species) species_support_ids.blank? || species_support_ids.include?(species.id) end