Permalink
Browse files

Remove deprecated `serialized_attributes`

  • Loading branch information...
rafaelfranca committed Jan 4, 2015
1 parent eef8a2c commit 82043ab53cb186d59b1b3be06122861758f814b2
@@ -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*
@@ -51,19 +51,6 @@ def serialize(attr_name, class_name_or_coder = Object)
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
@@ -22,12 +22,6 @@ def test_serialize_does_not_eagerly_load_columns
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)

0 comments on commit 82043ab

Please sign in to comment.