diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 4c48c3cde..c0ce8f0c3 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -3,14 +3,13 @@ def index end def sectors - @sectors = Rails.cache.fetch("published_sectors_with_sectorable_items", expires_in: 1.month) do + @sectors = Rails.cache.fetch("published_sectors", expires_in: 1.month) do Sector - .includes(:sectorable_items) - .references(:sectorable_items) .published - .distinct + .has_taggings .order(:name) - .to_a + .pluck(:id, :name) + .map { |id, name| OpenStruct.new(id: id, name: name) } end end