Sha256: 96ed3a141d6e9370f57e216886e16b0ae26774d1f2f5674878e7ef113f815619

Contents?: true

Size: 591 Bytes

Versions: 18

Compression:

Stored size: 591 Bytes

Contents

module Spree
  class TaxonsController < Spree::StoreController
    rescue_from ActiveRecord::RecordNotFound, :with => :render_404
    helper 'spree/products'

    respond_to :html

    def show
      @taxon = Taxon.find_by_permalink!(params[:id])
      return unless @taxon

      @searcher = build_searcher(params.merge(:taxon => @taxon.id))
      @products = @searcher.retrieve_products
      @taxonomies = Spree::Taxonomy.includes(root: :children)
    end

    private

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

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_frontend-2.2.14 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.13 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.12 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.11 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.10 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.9 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.8 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.7 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.6 app/controllers/spree/taxons_controller.rb
spree_frontend-2.3.2 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.5 app/controllers/spree/taxons_controller.rb
spree_frontend-2.3.1 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.4 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.3 app/controllers/spree/taxons_controller.rb
spree_frontend-2.3.0 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.2 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.1 app/controllers/spree/taxons_controller.rb
spree_frontend-2.2.0 app/controllers/spree/taxons_controller.rb