aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/dirty.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 18:20:30 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:42 -0300
commit37175a24bd508e2983247ec5d011d57df836c743 (patch)
treef2fd77cb880f81f7dce3ce1e20b8c8bea97dd155 /activemodel/lib/active_model/dirty.rb
parent4be859f0fdf7b3059a28d03c279f03f5938efc80 (diff)
downloadrails-37175a24bd508e2983247ec5d011d57df836c743.tar.gz
rails-37175a24bd508e2983247ec5d011d57df836c743.tar.bz2
rails-37175a24bd508e2983247ec5d011d57df836c743.zip
Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and `ActiveModel::Dirty#reset_changes`.
Diffstat (limited to 'activemodel/lib/active_model/dirty.rb')
-rw-r--r--activemodel/lib/active_model/dirty.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index 094424e4fd..9c8ca5d93f 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -116,7 +116,6 @@ module ActiveModel
included do
attribute_method_suffix '_changed?', '_change', '_will_change!', '_was'
- attribute_method_affix prefix: 'reset_', suffix: '!'
attribute_method_affix prefix: 'restore_', suffix: '!'
end
@@ -204,15 +203,6 @@ module ActiveModel
@changed_attributes = ActiveSupport::HashWithIndifferentAccess.new
end
- def reset_changes
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- `#reset_changes` is deprecated and will be removed on Rails 5.
- Please use `#clear_changes_information` instead.
- MSG
-
- clear_changes_information
- end
-
# Handle <tt>*_change</tt> for +method_missing+.
def attribute_change(attr)
[changed_attributes[attr], __send__(attr)] if attribute_changed?(attr)
@@ -231,16 +221,6 @@ module ActiveModel
set_attribute_was(attr, value)
end
- # Handle <tt>reset_*!</tt> for +method_missing+.
- def reset_attribute!(attr)
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- `#reset_#{attr}!` is deprecated and will be removed on Rails 5.
- Please use `#restore_#{attr}!` instead.
- MSG
-
- restore_attribute!(attr)
- end
-
# Handle <tt>restore_*!</tt> for +method_missing+.
def restore_attribute!(attr)
if attribute_changed?(attr)