Sha256: 2a99e52a0b522f0a7ca9de5502222338a0a17d71e8bb24bea9f2508974963a4f
Contents?: true
Size: 777 Bytes
Versions: 6
Compression:
Stored size: 777 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 private def load_data @search = object.products.active.search(params[:search]) ## push into model? ## @search.per_page ||= Spree::Config[:products_per_page] @products ||= @search.paginate(:include => [:images, {:variants => :images}], :per_page => Spree::Config[:products_per_page], :page => params[:page]) ## defunct? @product_cols = 3 end def object @object ||= end_of_association_chain.find_by_permalink(params[:id].join("/") + "/") end end
Version data entries
6 entries across 6 versions & 2 rubygems