mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge branch 'master' into enterprises
Conflicts: app/controllers/enterprises_controller.rb app/views/spree/checkout/_distributor.html.haml db/schema.rb spec/lib/open_food_web/group_buy_report_spec.rb
This commit is contained in:
@@ -7,6 +7,16 @@ class EnterprisesController < BaseController
|
||||
@suppliers = Enterprise.is_supplier
|
||||
end
|
||||
|
||||
def distributors
|
||||
@distributors = Enterprise.is_distributor
|
||||
|
||||
respond_to do |format|
|
||||
format.js do
|
||||
@distributor_details = Hash[@distributors.map { |d| [d.id, render_to_string(:partial => 'enterprises/distributor_details', :locals => {:distributor => d})] }]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
options = {:enterprise_id => params[:id]}
|
||||
options.merge(params.reject { |k,v| k == :id })
|
||||
|
||||
Reference in New Issue
Block a user