Sha256: 0c20b1ad7ead99b08aef3eb7d9aa661876b52747e110da911f050b0a6d3471cb

Contents?: true

Size: 650 Bytes

Versions: 90

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

module Spree
  class TaxonsController < Spree::StoreController
    helper 'spree/products', 'spree/taxon_filters'

    before_action :load_taxon, only: [:show]

    respond_to :html

    def show
      @searcher = build_searcher(params.merge(taxon: @taxon.id, include_images: true))
      @products = @searcher.retrieve_products
      @taxonomies = Spree::Taxonomy.includes(root: :children)
    end

    private

    def load_taxon
      @taxon = Spree::Taxon.find_by!(permalink: params[:id])
    end

    def accurate_title
      if @taxon
        @taxon.seo_title
      else
        super
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 2 rubygems

Version Path
solidus_frontend-4.0.0 app/controllers/spree/taxons_controller.rb
solidus_frontend-4.0.0.dev app/controllers/spree/taxons_controller.rb
solidus_frontend-3.4.0 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.1.9 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.4.0.dev app/controllers/spree/taxons_controller.rb
solidus_frontend-3.3.0 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.5 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.4 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.3 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.1.8 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.0.8 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.2 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.1 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.3.0.alpha app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.0 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.2.0.alpha app/controllers/spree/taxons_controller.rb
solidus_frontend-3.0.7 app/controllers/spree/taxons_controller.rb
solidus_frontend-2.11.17 app/controllers/spree/taxons_controller.rb
solidus_frontend-3.1.7 app/controllers/spree/taxons_controller.rb
solidus_frontend-2.11.16 app/controllers/spree/taxons_controller.rb