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.

[PATCH] Adds update_attribute! method to the ActiveRecord::Base

#3531

Similar to the ActiveRecord#update_attribute method, except this one goes through the normal validation procedure. An exception is raised if the record is invalid.

Reported by Indrek Juhkam · December 1st, 2009 @ 05:47 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to wontfix
    • Assigned user set to Pratik

    According to the api docs for update_attribute:

    Updates a single attribute and saves the record without going through the normal validation procedure. This is especially useful for boolean flags on existing records.

    If you need validations you can just use update_attributes.

    June 17th, 2010 @ 08:51 AM

  2. Rohit Arondekar