Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #15741 from sgrif/sg-update-deprecation-message

Change the deprecation warning on `serialized_attributes`
  • Loading branch information...
commit 3268a04e991994e37515873339e120deba1ce144 2 parents f59ed56 + b069ab6
Yves Senn senny authored
10 activerecord/lib/active_record/attribute_methods/serialization.rb
View
@@ -50,14 +50,8 @@ def serialize(attr_name, class_name_or_coder = Object)
def serialized_attributes
ActiveSupport::Deprecation.warn(<<-WARNING.strip_heredoc)
- `serialized_attributes` is deprecated, and will be removed in Rails 5.0.
- If you need to access the serialization behavior, you can do:
-
- #{self.class.name}.column_for_attribute('foo').type_cast_for_database(value)
-
- or
-
- #{self.class.name}.column_for_attribute('foo').type_cast_from_database(value)
+ `serialized_attributes` is deprecated without replacement, and will
+ be removed in Rails 5.0.
WARNING
@serialized_attributes ||= Hash[
columns.select { |t| t.cast_type.is_a?(Type::Serialized) }.map { |c|
Please sign in to comment.
Something went wrong with that request. Please try again.