aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-15 16:00:50 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-15 16:04:31 -0300
commit66d0a0153578ce760d822580c5b8c0b726042ac2 (patch)
tree9307990257adef0f8908d8ef150677ef87bf2947 /activerecord/lib
parent101cf688987ec39c05859061677f99b43facc2a2 (diff)
downloadrails-66d0a0153578ce760d822580c5b8c0b726042ac2.tar.gz
rails-66d0a0153578ce760d822580c5b8c0b726042ac2.tar.bz2
rails-66d0a0153578ce760d822580c5b8c0b726042ac2.zip
Deprecate ActiveModel::Dirty#reset_changes in favor of #clear_changes_information
This method name is causing confusion with the `reset_#{attribute}` methods. While `reset_name` set the value of the name attribute for the previous value the `reset_changes` only discard the changes and previous changes.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/attribute_methods/dirty.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb
index e1a86fd3aa..b58295a106 100644
--- a/activerecord/lib/active_record/attribute_methods/dirty.rb
+++ b/activerecord/lib/active_record/attribute_methods/dirty.rb
@@ -34,7 +34,7 @@ module ActiveRecord
# <tt>reload</tt> the record and clears changed attributes.
def reload(*)
super.tap do
- reset_changes
+ clear_changes_information
end
end
@@ -64,7 +64,7 @@ module ActiveRecord
store_original_raw_attributes
end
- def reset_changes
+ def clear_changes_information
super
original_raw_attributes.clear
end