aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-06-15 16:48:59 +0200
committerYves Senn <yves.senn@gmail.com>2014-06-15 16:48:59 +0200
commit3268a04e991994e37515873339e120deba1ce144 (patch)
tree1ead4dca818e6f3b0b89c8e7c1eadd6666ec4108 /activerecord/lib
parentf59ed560ac68aad47e56b6b0442b0b855ae9951e (diff)
parentb069ab66d3be2371158fed302d2df6572174dece (diff)
downloadrails-3268a04e991994e37515873339e120deba1ce144.tar.gz
rails-3268a04e991994e37515873339e120deba1ce144.tar.bz2
rails-3268a04e991994e37515873339e120deba1ce144.zip
Merge pull request #15741 from sgrif/sg-update-deprecation-message
Change the deprecation warning on `serialized_attributes`
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/attribute_methods/serialization.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb
index d06d5bcd92..734d94865a 100644
--- a/activerecord/lib/active_record/attribute_methods/serialization.rb
+++ b/activerecord/lib/active_record/attribute_methods/serialization.rb
@@ -50,14 +50,8 @@ module ActiveRecord
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|