From 7e538e81541f4c756cf465d7240b85cfe290676a Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 21 Sep 2012 22:31:02 -0500 Subject: fix AR::AttributeMethods::Dirty :nodoc: [ci skip] --- activerecord/lib/active_record/attribute_methods/dirty.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord') 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 save! 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 # reload the record and clears changed attributes. - def reload(*) #:nodoc: + def reload(*) super.tap do @previously_changed.clear @changed_attributes.clear -- cgit v1.2.3