Sha256: bfb89b3682a1d52f8606c6381633f25cc35bbdd84774c75d399efe97b7af7c30

Contents?: true

Size: 455 Bytes

Versions: 4

Compression:

Stored size: 455 Bytes

Contents

module Spree
  TaxonsController.class_eval do

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

      if @taxon.live?
        @searcher = Spree::Config.searcher_class.new(params.merge(:taxon => @taxon.id))
        @products = @searcher.retrieve_products

        respond_with(@taxon)
      else
        redirect_to root_url, :error => t('spree.active_sale.event.flash.error')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_active_sale-2.0.0 app/controllers/spree/taxons_controller_decorator.rb
spree_active_sale-1.3.2 app/controllers/spree/taxons_controller_decorator.rb
spree_active_sale-1.3.1 app/controllers/spree/taxons_controller_decorator.rb
spree_active_sale-1.3.0 app/controllers/spree/taxons_controller_decorator.rb