Forum: Ruby on Rails Update method problem in rails 2.2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
senthil raja (Guest)
on 2009-03-18 12:11
(Received via mailing list)
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
James Cowlishaw (Guest)
on 2009-03-18 13:46
(Received via mailing list)
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>
This topic is locked and can not be replied to.