diff options
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 2bcea9dd5d..81f9f84d21 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -789,7 +789,13 @@ module ActiveRecord #:nodoc: # Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. def update_attribute(name, value) self[name] = value - save + return save + end + + # Updates all the attributes in from the passed hash and saves the record. + def update_attributes(attributes) + attributes = attributes + return save end # Returns the value of attribute identified by <tt>attr_name</tt> after it has been type cast (for example, |