This project is archived and is in readonly mode.

#5219 ✓resolved
xHire

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.
  1. There should be stated that it applies only to already existing records, because new records remain unsaved.
  2. 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

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>

People watching this ticket

Pages