Sha256: 238c56c3860937b3e84a9097f8d739bfaaf6eae1f6fd4f7d8512abfaf40c3fed

Contents?: true

Size: 487 Bytes

Versions: 9

Compression:

Stored size: 487 Bytes

Contents

class TaxonsController < Spree::BaseController
  prepend_before_filter :reject_unknown_object, :only => [:show]
  before_filter :load_data, :only => :show
  resource_controller
  actions :show
  helper :products

  include Spree::Search

  private
  def load_data
    @taxon ||= object
    retrieve_products
  end

  def object
    @object ||= end_of_association_chain.find_by_permalink(params[:id].join("/") + "/")
  end
  
  def accurate_title
    @taxon ? @taxon.name : nil
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree-0.11.4 app/controllers/taxons_controller.rb
spree-0.11.3 app/controllers/taxons_controller.rb
spree-0.11.2 app/controllers/taxons_controller.rb
spree-0.11.1 app/controllers/taxons_controller.rb
spree-0.11.0 app/controllers/taxons_controller.rb
spree-0.10.2 app/controllers/taxons_controller.rb
spree-0.10.1 app/controllers/taxons_controller.rb
spree-0.10.0 app/controllers/taxons_controller.rb
spree-0.10.0.beta app/controllers/taxons_controller.rb