1
0
Fork 0
forked from OpenNeo/impress

Stop using update_attributes

Idk when this got removed, but it did! Ok goodbye!
This commit is contained in:
Emi Matchu 2023-08-06 15:56:28 -07:00
parent 83f80facda
commit 07d2519e40
3 changed files with 6 additions and 3 deletions

View file

@ -23,7 +23,8 @@ class ClosetListsController < ApplicationController
end end
def update def update
if @closet_list.update_attributes(closet_list_params) @closet_list.attributes = closet_list_params
if @closet_list.save
save_successful! save_successful!
else else
save_failed! save_failed!

View file

@ -102,7 +102,8 @@ class OutfitsController < ApplicationController
end end
def update def update
if @outfit.update_attributes(outfit_params) @outfit.attributes = outfit_params
if @outfit.save
render :json => @outfit render :json => @outfit
else else
render_outfit_errors render_outfit_errors

View file

@ -17,7 +17,8 @@ class UsersController < ApplicationController
end end
def update def update
success = @user.update_attributes user_params @user.attributes = user_params
success = @user.save
respond_to do |format| respond_to do |format|
format.html { format.html {
if success if success