This project is archived and is in readonly mode.

#3531 ✓wontfix
Indrek Juhkam

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

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

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.

Comments and changes to this ticket

  • Rohit Arondekar

    Rohit Arondekar June 17th, 2010 @ 08:51 AM

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

  • Rohit Arondekar

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>

Attachments

Pages