Forum: Ruby on Rails update_attributes not working

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Robbie S. (Guest)
on 2006-01-16 01:25
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"
			flash["success"] = "no good"
			redirect_to :action => "list"

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

<input id="user_firstname" name="user[firstname]" size="30" type="text"
value="<%=@user.firstname %>" />

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!
This topic is locked and can not be replied to.