mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
16 lines
355 B
Ruby
16 lines
355 B
Ruby
class SuppliersController < BaseController
|
|
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 = Spree::Config.searcher_class.new(options)
|
|
@products = @searcher.retrieve_products
|
|
end
|
|
end
|