Skip to content

Commit

Permalink
Remove deprecated serialized_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 4, 2015
1 parent eef8a2c commit 82043ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
13 changes: 0 additions & 13 deletions activerecord/lib/active_record/attribute_methods/serialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions activerecord/test/cases/serialized_attribute_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 82043ab

Please sign in to comment.