Sha256: 5e844e6941978cdf044ef9ac7f0a8bd60130a58083321795379d6e301b60e01d

Contents?: true

Size: 644 Bytes

Versions: 6

Compression:

Stored size: 644 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 = Spree::Config.searcher_class.new(params.merge(:taxon => @taxon.id))
      @searcher.current_user = try_spree_current_user
      @searcher.current_currency = current_currency
      @products = @searcher.retrieve_products

      respond_with(@taxon)
    end

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
spree_core-1.3.2 app/controllers/spree/taxons_controller.rb
spree_core-1.3.1 app/controllers/spree/taxons_controller.rb
spree_core-1.3.0 app/controllers/spree/taxons_controller.rb
spree_core-1.3.0.rc2 app/controllers/spree/taxons_controller.rb
dup_spree_core-1.3.0.rc1 app/controllers/spree/taxons_controller.rb
spree_core-1.3.0.rc1 app/controllers/spree/taxons_controller.rb