Sha256: 8730ac0007c3ee7de81a22404dad1217bd53d8dd8f9910f3457ad4d5339eea90

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

module Spree
  class TaxonsController < BaseController
    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 = Spree::Config.searcher_class.new(params.merge(:taxon => @taxon.id))
      @searcher.current_user = try_spree_current_user
      @products = @searcher.retrieve_products

      respond_with(@taxon)
    end

    private
      def accurate_title
        @taxon ? @taxon.name : super
      end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_core-1.2.5 app/controllers/spree/taxons_controller.rb
spree_core-1.2.4 app/controllers/spree/taxons_controller.rb
spree_core-1.2.3 app/controllers/spree/taxons_controller.rb
spree_core-1.2.2 app/controllers/spree/taxons_controller.rb