Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

update_attribute doesn't save new record -- documentation should notice this

#5219

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).

Reported by xHire · July 27th, 2010 @ 06:18 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh
    • 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.

    July 27th, 2010 @ 06:56 PM