diff --git a/app/controllers/spree/orders_controller_decorator.rb b/app/controllers/spree/orders_controller_decorator.rb index 730d96b279..49612546b4 100644 --- a/app/controllers/spree/orders_controller_decorator.rb +++ b/app/controllers/spree/orders_controller_decorator.rb @@ -1,3 +1,5 @@ +require 'spree/core/controller_helpers/order_decorator' + Spree::OrdersController.class_eval do before_filter :populate_order_distributor, :only => :populate before_filter :populate_order_count_on_hand, :only => :populate diff --git a/config/database.yml b/config/database.yml index 40ffe445f7..9633824f0f 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,12 +1,8 @@ development: adapter: postgresql encoding: unicode - #template: template0 - #collate: en_US.UTF8 - #ctype: en_US.UTF8 database: open_food_web_dev pool: 5 - host: localhost username: ofw password: f00d @@ -15,7 +11,6 @@ test: encoding: unicode database: open_food_web_test pool: 5 - host: localhost username: ofw password: f00d @@ -26,4 +21,4 @@ production: database: open_food_web_prod pool: 5 username: ofw - password: f00d + password: f00d \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index b99bd0a260..a35dd39545 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -422,7 +422,6 @@ ActiveRecord::Schema.define(:version => 20130207043555) do t.string "email" t.text "special_instructions" t.integer "distributor_id" - t.integer "order_cycle_id" t.string "currency" t.string "last_ip_address" end diff --git a/spec/lib/open_food_web/order_cycle_form_applicator_spec.rb b/spec/lib/open_food_web/order_cycle_form_applicator_spec.rb index 4ebf51e9ba..18b64986bf 100644 --- a/spec/lib/open_food_web/order_cycle_form_applicator_spec.rb +++ b/spec/lib/open_food_web/order_cycle_form_applicator_spec.rb @@ -160,7 +160,7 @@ module OpenFoodWeb applicator.send(:update_exchange, sender.id, receiver.id, {:variant_ids => [variant1.id, variant3.id]}) exchange.reload - exchange.variant_ids.should == [variant1.id, variant3.id] + exchange.variant_ids.sort.should == [variant1.id, variant3.id].sort applicator.send(:touched_exchanges).should == [exchange] end end