Skip to content

Commit 82043ab

Browse files
committed
Remove deprecated serialized_attributes
1 parent eef8a2c commit 82043ab

3 files changed

Lines changed: 4 additions & 19 deletions

File tree

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `serialized_attributes`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated automatic counter caches on `has_many :through`.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/attribute_methods/serialization.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ def serialize(attr_name, class_name_or_coder = Object)
5151
Type::Serialized.new(type, coder)
5252
end
5353
end
54-
55-
def serialized_attributes
56-
ActiveSupport::Deprecation.warn(<<-MSG.squish)
57-
`serialized_attributes` is deprecated without replacement, and will
58-
be removed in Rails 5.0.
59-
MSG
60-
61-
@serialized_attributes ||= Hash[
62-
columns.select { |t| t.cast_type.is_a?(Type::Serialized) }.map { |c|
63-
[c.name, c.cast_type.coder]
64-
}
65-
]
66-
end
6754
end
6855
end
6956
end

activerecord/test/cases/serialized_attribute_test.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ def test_serialize_does_not_eagerly_load_columns
2222
end
2323
end
2424

25-
def test_list_of_serialized_attributes
26-
assert_deprecated do
27-
assert_equal %w(content), Topic.serialized_attributes.keys
28-
end
29-
end
30-
3125
def test_serialized_attribute
3226
Topic.serialize("content", MyObject)
3327

0 commit comments

Comments
 (0)