Sha256: 545016c7d3887cc51d4533b1282ea4c214275708983be78c782babfa02846072

Contents?: true

Size: 483 Bytes

Versions: 1

Compression:

Stored size: 483 Bytes

Contents

module Spree
  TaxonsController.class_eval do

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

      if Spree::ActiveSale::Event.is_live? @taxon
        @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

1 entries across 1 versions & 1 rubygems

Version Path
spree_active_sale-1.0.6 app/controllers/taxons_controller_decorator.rb