Forum: Ruby on Rails ActiveRecord / update_attributes

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.
137039860fa6b38713e1349da8a4137d?d=identicon&s=25 Marc.Love (Guest)
on 2005-11-22 00:32
(Received via mailing list)
I'm having a problem getting update_attributes to work on my Document
model which has a HABTM relationship with my Category model.  I have a
form that's submitting parameters as follows:

Parameters: {"commit"=>"Submit changes", "action"=>"update",
"document"=>{"promote"=>"1", "abstract"=>"", "title"=>"2005 Holidays
Schedule", "type_id"=>"4", "category_ids"=>["12", "26"],
"revision_interval"=>"", "active"=>"1"}, "id"=>"209",
"controller"=>"admin/documents", "attribute_change_to"=>"1"}

I'm using the @document.update_attributes command to update the
attributes, but it's returning false.  So I tried to update each of the
document attributes singularly through console using the command
@document.update_attribute and all of them worked fine.  This problem
arose after my upgrade from 0.13.1 to 0.14.3.

I also have an Employees model using the exact same code for another
HABTM relationship and there I have no problem whatsoever with
update_attributes.

Can someone please help?  I'm going insane trying to figure this out.

Thanks,
Marc
==================DISCLAIMER================================
This email may contain confidential and privileged material for the sole
use of the intended recipient.
Any review or distribution by others is strictly prohibited. If you are
not the intended recipient, please contact the sender and delete all
copies of it from your system.
The sender accepts no responsibility for viruses and it is your
responsibility to scan attachments (if any).
No contracts may be concluded on behalf of the sender by means of email
communications unless expressly stated to the contrary.
==================DISCLAIMER================================
This topic is locked and can not be replied to.