This project is archived and is in readonly mode.
update_attribute doesn't save new record -- documentation should notice this
Reported by xHire | July 27th, 2010 @ 06:18 PM
Since Rails 3.0.0 RC method ActiveRecord::Persistence.update_attribute doesn't save new record (if it isn't another bug), so the documentation of this method has not been accurate.
Mentioning only relevant text, there is:
Updates a single attribute and saves the record.
- There should be stated that it applies only to already existing
records, because new records remain unsaved.
- The record is not saved as a whole but only the one attribute (updated by calling this method) is saved (i.e. all remaining dirty attributes are not saved).
Comments and changes to this ticket
-
Neeraj Singh July 27th, 2010 @ 06:56 PM
- State changed from new to resolved
- Importance changed from to Low
It is not a bug.
Document has been updated . http://github.com/lifo/docrails/commit/c9fe3c3bd0ee5010a36a157fe850...
Thanks for the feeback.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>