Changeset 9011
- Timestamp:
- 03/11/08 12:05:06 (4 months ago)
- Files:
-
- trunk/activerecord/lib/active_record/base.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/lib/active_record/base.rb
r8936 r9011 2140 2140 2141 2141 # Increments the +attribute+ and saves the record. 2142 # Note: Updates made with this method aren't subjected to validation checks 2142 2143 def increment!(attribute, by = 1) 2143 2144 increment(attribute, by).update_attribute(attribute, self[attribute]) … … 2152 2153 2153 2154 # Decrements the +attribute+ and saves the record. 2155 # Note: Updates made with this method aren't subjected to validation checks 2154 2156 def decrement!(attribute, by = 1) 2155 2157 decrement(attribute, by).update_attribute(attribute, self[attribute]) … … 2163 2165 2164 2166 # Toggles the +attribute+ and saves the record. 2167 # Note: Updates made with this method aren't subjected to validation checks 2165 2168 def toggle!(attribute) 2166 2169 toggle(attribute).update_attribute(attribute, self[attribute])