From c0d8f587757670b3b717f196ba024be9ee60aef6 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 18 Jul 2017 10:37:31 -0400 Subject: Remove deprecated code concerning non-attributes and `*_will_change!` --- activerecord/lib/active_record/attribute_methods/dirty.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'activerecord/lib/active_record/attribute_methods') diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 1931a58ec8..5efe051125 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -209,17 +209,7 @@ module ActiveRecord def attribute_will_change!(attr_name) super - if self.class.has_attribute?(attr_name) - mutations_from_database.force_change(attr_name) - else - ActiveSupport::Deprecation.warn(<<-EOW.squish) - #{attr_name} is not an attribute known to Active Record. - This behavior is deprecated and will be removed in the next - version of Rails. If you'd like #{attr_name} to be managed - by Active Record, add `attribute :#{attr_name}` to your class. - EOW - mutations_from_database.deprecated_force_change(attr_name) - end + mutations_from_database.force_change(attr_name) end def _update_record(*) -- cgit v1.2.3