# Update\_attributes not working

**URL:** <https://www.ruby-forum.com/t/update-attributes-not-working/52537>\
**Category:** Rails\
**Created:** [January 16, 2006, 12:25am UTC](https://www.ruby-forum.com/t/update-attributes-not-working/52537 "2006-01-16T00:25:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [January 16, 2006, 12:25am UTC](https://www.ruby-forum.com/t/update-attributes-not-working/52537/1 "2006-01-16T00:25:00Z")

</div>

I dont know if its me or the dodgy win-32 intall of ruby/mysql, but I  
can’t seem to get update\_attributes to work.

In my user controller, I have:

def update  
@user = User.find(@params[‘user’][“id”])  
if @user.update\_attributes(@params[“user”])  
flash[“success”] = “Updated Successfully”  
redirect\_to :action =\> “list”  
else  
flash[“success”] = “no good”  
redirect\_to :action =\> “list”  
end  
end

and in my edit.rhtml view, I have a form with fields such as:

I can manually update each column in the table by writing  
@user.update\_attribute(:firstname, @params[‘user’][“firstname”])  
etc, but updating all the attributes at once isn’t working…

please tell me its something simple and stupid that I’ve done!
