app/controllers/spree/admin/orders_controller.rb in spree_backend-3.7.14.1 vs app/controllers/spree/admin/orders_controller.rb in spree_backend-4.0.0.beta
- old
+ new
@@ -78,11 +78,11 @@
def store
@stores = Spree::Store.all
end
def update
- if @order.update_attributes(params[:order]) && @order.line_items.present?
+ if @order.update(params[:order]) && @order.line_items.present?
@order.update_with_updater!
unless @order.completed?
# Jump to next step if order is not completed.
redirect_to admin_order_customer_path(@order) and return
end
@@ -133,10 +133,10 @@
respond_with(@order) { |format| format.html { redirect_back fallback_location: spree.admin_order_adjustments_url(@order) } }
end
def set_store
- if @order.update_attributes(store_id: params[:order][:store_id])
+ if @order.update(store_id: params[:order][:store_id])
flash[:success] = flash_message_for(@order, :successfully_updated)
else
flash[:error] = @order.errors.full_messages.join(', ')
end