Rails 6.1 Deprecates update_attributes

This commit is contained in:
2023-12-29 20:25:26 -05:00
parent 96e4e9df66
commit 47868051f8

View File

@@ -115,7 +115,7 @@ class CustomersController < ApplicationController
def update
begin
@customer = Customer.find_by_id(params[:id])
if @customer.update_attributes(params)
if @customer.update(allowed_params)
flash[:notice] = "Customer updated"
redirect_to @customer
else