mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
20 lines
418 B
Ruby
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
|