Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit82043ab

Browse files
committed
Remove deprecatedserialized_attributes
1 parenteef8a2c commit82043ab

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

‎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-
defserialized_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-
deftest_list_of_serialized_attributes
26-
assert_deprecateddo
27-
assert_equal%w(content),Topic.serialized_attributes.keys
28-
end
29-
end
30-
3125
deftest_serialized_attribute
3226
Topic.serialize("content",MyObject)
3327

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp