diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 23:36:27 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:58:43 -0300 |
commit | 82043ab53cb186d59b1b3be06122861758f814b2 (patch) | |
tree | ce18462fb70621a540c6caefbe425ac3ffa0109c | |
parent | eef8a2c6f249d923f191491ddb10d20faa4e170a (diff) | |
download | rails-82043ab53cb186d59b1b3be06122861758f814b2.tar.gz rails-82043ab53cb186d59b1b3be06122861758f814b2.tar.bz2 rails-82043ab53cb186d59b1b3be06122861758f814b2.zip |
Remove deprecated `serialized_attributes`
-rw-r--r-- | activerecord/CHANGELOG.md | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/serialization.rb | 13 | ||||
-rw-r--r-- | activerecord/test/cases/serialized_attribute_test.rb | 6 |
3 files changed, 4 insertions, 19 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 0bb3930a09..17e2c22a38 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `serialized_attributes`. + + *Rafael Mendonça França* + * Remove deprecated automatic counter caches on `has_many :through`. *Rafael Mendonça França* diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index e5ec5ddca5..7c433dd366 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -51,19 +51,6 @@ module ActiveRecord Type::Serialized.new(type, coder) end end - - def serialized_attributes - ActiveSupport::Deprecation.warn(<<-MSG.squish) - `serialized_attributes` is deprecated without replacement, and will - be removed in Rails 5.0. - MSG - - @serialized_attributes ||= Hash[ - columns.select { |t| t.cast_type.is_a?(Type::Serialized) }.map { |c| - [c.name, c.cast_type.coder] - } - ] - end end end end diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb index c261a5b1c0..e29f7462c8 100644 --- a/activerecord/test/cases/serialized_attribute_test.rb +++ b/activerecord/test/cases/serialized_attribute_test.rb @@ -22,12 +22,6 @@ class SerializedAttributeTest < ActiveRecord::TestCase end end - def test_list_of_serialized_attributes - assert_deprecated do - assert_equal %w(content), Topic.serialized_attributes.keys - end - end - def test_serialized_attribute Topic.serialize("content", MyObject) |