diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-18 10:37:31 -0400 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-18 10:37:31 -0400 |
commit | c0d8f587757670b3b717f196ba024be9ee60aef6 (patch) | |
tree | 3fc2d9877b4ff44a8447c9d9f96d7b64fb81ec88 /activerecord/lib/active_record/attribute_methods | |
parent | 020abadf047997cb3df18a59d210dfe4406cf166 (diff) | |
download | rails-c0d8f587757670b3b717f196ba024be9ee60aef6.tar.gz rails-c0d8f587757670b3b717f196ba024be9ee60aef6.tar.bz2 rails-c0d8f587757670b3b717f196ba024be9ee60aef6.zip |
Remove deprecated code concerning non-attributes and `*_will_change!`
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 12 |
1 files changed, 1 insertions, 11 deletions
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(*) |