Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Another fix related to change in Rails update_attribute.

  • Loading branch information...
commit 28701477ed8d067fec49ed9b28244f0c94901fdb 1 parent f7655eb
@schof schof authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 core/app/controllers/orders_controller.rb
View
7 core/app/controllers/orders_controller.rb
@@ -83,9 +83,10 @@ def prevent_editing_complete_order
def set_user
#only if the user is blank and the order is in_progress
- if @order && @order.user.nil? && @order.in_progress?
- @order.checkout.update_attribute(:email, current_user && current_user.email) if @order.checkout
- @order.update_attribute(:user, current_user)
+ if @order && @order.user.nil? && @order.in_progress? && current_user
+ @order.checkout.update_attribute(:email, current_user.email) if @order.checkout
+ @order.user = current_user
+ @order.save
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.