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:
Rohan Mitchell
2012-11-01 11:02:02 +11:00
23 changed files with 945 additions and 36 deletions

View File

@@ -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 })