This project is archived and is in readonly mode.
ActiveResource#attributes= Clobbers All Values
-
fluxin
- Tag set to activeresource, bug
attribute= is meant to assign all attributes not a single one. This is the expected behavior. If you're looking to modify the record use update_attributes.
-
Matthew Moore
What if you don't want to modify the record remotely, just yet?
E.g. do the following... This is pretty standard controller code, for an ActiveRecord, i would think.
remote = MyResource.find(1) remote.attributes = { :message => "NEW MESSAGE" }
do something else with "remote" before save
remote.xyz_method
if remote.save ... else ... end
-
josh
- State changed from new to wontfix