replace deprecated update_attributes with update
This commit is contained in:
parent
eb45a2bf21
commit
3ffdb424d5
28 changed files with 52 additions and 53 deletions
|
|
@ -23,8 +23,8 @@ class HomeController < ApplicationController
|
|||
end
|
||||
|
||||
def update_profile
|
||||
if @current_user.update_attributes(user_params)
|
||||
@current_user.ordergroup.update_attributes(ordergroup_params) if ordergroup_params
|
||||
if @current_user.update(user_params)
|
||||
@current_user.ordergroup.update(ordergroup_params) if ordergroup_params
|
||||
session[:locale] = @current_user.locale
|
||||
redirect_to my_profile_url, notice: I18n.t('home.changes_saved')
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue