diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-21 22:31:02 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-09-21 22:31:02 -0500 |
commit | 7e538e81541f4c756cf465d7240b85cfe290676a (patch) | |
tree | dbe14ec02c972768f6379fa611cca82e59d6d7cb /activerecord | |
parent | e216b00a5ef6038ba227faf3207891c403fb8d1c (diff) | |
download | rails-7e538e81541f4c756cf465d7240b85cfe290676a.tar.gz rails-7e538e81541f4c756cf465d7240b85cfe290676a.tar.bz2 rails-7e538e81541f4c756cf465d7240b85cfe290676a.zip |
fix AR::AttributeMethods::Dirty :nodoc: [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 60e5b0e2bb..ba32f1ec51 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -7,7 +7,7 @@ module ActiveRecord end module AttributeMethods - module Dirty + module Dirty # :nodoc: extend ActiveSupport::Concern include ActiveModel::Dirty @@ -21,7 +21,7 @@ module ActiveRecord end # Attempts to +save+ the record and clears changed attributes if successful. - def save(*) #:nodoc: + def save(*) if status = super @previously_changed = changes @changed_attributes.clear @@ -30,7 +30,7 @@ module ActiveRecord end # Attempts to <tt>save!</tt> the record and clears changed attributes if successful. - def save!(*) #:nodoc: + def save!(*) super.tap do @previously_changed = changes @changed_attributes.clear @@ -38,7 +38,7 @@ module ActiveRecord end # <tt>reload</tt> the record and clears changed attributes. - def reload(*) #:nodoc: + def reload(*) super.tap do @previously_changed.clear @changed_attributes.clear |