Update method problem in rails 2.2


#1

Hi Rails passengers

While doing update i am facing new type of error in rails 2.2.2

Its having params eg) params[:me][:like]

while doing @me.update_attribute(params[:me])
i am getting updated successfully but its not done actually… Not
getting
any errors in log tooo

How to fix this

Thanks in Advance


#2

Senthil,
if you want to update @me with multiple values from params[:me], you
might
want to be using update_attributes, not the singular version.
See http://apidock.com/rails/ActiveRecord/Base/update_attribute and
http://apidock.com/rails/ActiveRecord/Base/update_attributes for the
difference.

James.

2009/3/18 senthil raja removed_email_address@domain.invalid