Files
openfoodnetwork/app/controllers/spree/suppliers_controller.rb
2012-10-17 07:50:58 +11:00

20 lines
418 B
Ruby

module Spree
class SuppliersController < BaseController
helper 'spree/products'
def index
@suppliers = Supplier.all
end
def show
options = {:supplier_id => params[:id]}
options.merge(params.reject { |k,v| k == :id })
@supplier = Supplier.find params[:id]
@searcher = Config.searcher_class.new(options)
@products = @searcher.retrieve_products
end
end
end