aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-30 16:55:01 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-06-30 16:55:01 -0300
commitdc67d3d2a1480f82ffcce418cf4bcad5dfb2a177 (patch)
tree27f6899bf783b49cdf7e7126d54bd0aed6508861 /activemodel/lib/active_model
parentb34f7c1706bbe20c1dc334884f9ba5ae7182f9f2 (diff)
downloadrails-dc67d3d2a1480f82ffcce418cf4bcad5dfb2a177.tar.gz
rails-dc67d3d2a1480f82ffcce418cf4bcad5dfb2a177.tar.bz2
rails-dc67d3d2a1480f82ffcce418cf4bcad5dfb2a177.zip
Rename rollback_changes to undo_changes
To avoid overload with database rollback
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/dirty.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index e5bfee2291..dc6088a39a 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -17,7 +17,7 @@ module ActiveModel
# * Call <tt>changes_applied</tt> after the changes are persisted.
# * Call <tt>reset_changes</tt> when you want to reset the changes
# information.
- # * Call <tt>rollback_changes</tt> when you want to restore previous data
+ # * Call <tt>undo_changes</tt> when you want to restore previous data.
#
# A minimal implementation could be:
#
@@ -45,7 +45,7 @@ module ActiveModel
# end
#
# def rollback!
- # rollback_changes
+ # undo_changes
# end
# end
#
@@ -191,7 +191,7 @@ module ActiveModel
end
# Restore all previous data.
- def rollback_changes # :doc:
+ def undo_changes # :doc:
changed_attributes.each_key { |attr| reset_attribute! attr }
end