replace update_attributes with updat since deprecated
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
viehlieb 2022-10-13 18:25:52 +02:00
parent 85270e70cf
commit af3444bba6
25 changed files with 42 additions and 42 deletions

View file

@ -51,7 +51,7 @@ class Finance::BalancingController < Finance::BaseController
def update_note
@order = Order.find(params[:id])
if @order.update_attributes(params[:order])
if @order.update(params[:order])
render :layout => false
else
render :action => :edit_note, :layout => false
@ -65,7 +65,7 @@ class Finance::BalancingController < Finance::BaseController
def update_transport
@order = Order.find(params[:id])
@order.update_attributes! params[:order]
@order.update! params[:order]
redirect_to new_finance_order_path(order_id: @order.id)
rescue => error
redirect_to new_finance_order_path(order_id: @order.id), alert: t('errors.general_msg', msg: error.message)

View file

@ -63,7 +63,7 @@ class Finance::InvoicesController < ApplicationController
end
def update
if @invoice.update_attributes(params[:invoice])
if @invoice.update(params[:invoice])
redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice')
else
fill_deliveries_and_orders_collection @invoice.id, @invoice.supplier_id