app/controllers/spree/admin/adjustments_controller.rb in spree_backend-3.0.10 vs app/controllers/spree/admin/adjustments_controller.rb in spree_backend-3.1.0.rc1
- old
+ new
@@ -11,21 +11,21 @@
skip_before_action :load_resource, only: [:toggle_state, :edit, :update, :destroy]
before_action :find_adjustment, only: [:destroy, :edit, :update]
def index
- @adjustments = @order.all_adjustments.order("created_at ASC")
+ @adjustments = @order.all_adjustments.order(created_at: :asc)
end
private
def find_adjustment
# Need to assign to @object here to keep ResourceController happy
@adjustment = @object = parent.all_adjustments.find(params[:id])
end
def update_totals
- @order.reload.update!
+ @order.reload.update_with_updater!
end
# Override method used to create a new instance to correctly
# associate adjustment with order
def build_resource