Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9011

Show
Ignore:
Timestamp:
03/11/08 12:05:06 (4 months ago)
Author:
pratik
Message:

Add warning in documentation for increment!, decrement! and toggle! methods. Closes #11098 [DefV]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/base.rb

    r8936 r9011  
    21402140 
    21412141      # Increments the +attribute+ and saves the record. 
     2142      # Note: Updates made with this method aren't subjected to validation checks 
    21422143      def increment!(attribute, by = 1) 
    21432144        increment(attribute, by).update_attribute(attribute, self[attribute]) 
     
    21522153 
    21532154      # Decrements the +attribute+ and saves the record. 
     2155      # Note: Updates made with this method aren't subjected to validation checks 
    21542156      def decrement!(attribute, by = 1) 
    21552157        decrement(attribute, by).update_attribute(attribute, self[attribute]) 
     
    21632165 
    21642166      # Toggles the +attribute+ and saves the record. 
     2167      # Note: Updates made with this method aren't subjected to validation checks 
    21652168      def toggle!(attribute) 
    21662169        toggle(attribute).update_attribute(attribute, self[attribute])