Permalink
Browse files

We should ensure these are valid

  • Loading branch information...
1 parent 30adcb5 commit f261e916b4323e4be69f9c4d4ca400d567ffe7db @benhutton benhutton committed May 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/checkout_controller_decorator.rb
View
2 app/controllers/checkout_controller_decorator.rb
@@ -21,7 +21,7 @@ def set_addresses
end
def normalize_addresses
- return unless params[:state] == "address" && @order.bill_address_id && @order.ship_address_id
+ return unless params[:state] == "address" && @order.bill_address_id && @order.ship_address_id && @order.bill_address.valid? && @order.ship_address.valid?
@order.bill_address.reload
@order.ship_address.reload
if @order.bill_address_id != @order.ship_address_id && @order.bill_address.same_as?(@order.ship_address)

0 comments on commit f261e91

Please sign in to comment.