diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-13 19:37:10 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-14 06:21:28 -0600 |
commit | 2df1540143f1a57ab7aae8ff926266cc233292c5 (patch) | |
tree | 22bcc8fd9373786a1424f159db1b8e258bd79885 /activerecord/test/cases/serialized_attribute_test.rb | |
parent | 34221cdcab7d145d22029174a990b3971616cc80 (diff) | |
download | rails-2df1540143f1a57ab7aae8ff926266cc233292c5.tar.gz rails-2df1540143f1a57ab7aae8ff926266cc233292c5.tar.bz2 rails-2df1540143f1a57ab7aae8ff926266cc233292c5.zip |
Deprecate `serialized_attributes` without replacement
We've stopped using it internally, in favor of polymorphism. So should
you!
Diffstat (limited to 'activerecord/test/cases/serialized_attribute_test.rb')
-rw-r--r-- | activerecord/test/cases/serialized_attribute_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb index 82df0a5f08..186a1a2ade 100644 --- a/activerecord/test/cases/serialized_attribute_test.rb +++ b/activerecord/test/cases/serialized_attribute_test.rb @@ -22,7 +22,9 @@ class SerializedAttributeTest < ActiveRecord::TestCase end def test_list_of_serialized_attributes - assert_equal %w(content), Topic.serialized_attributes.keys + assert_deprecated do + assert_equal %w(content), Topic.serialized_attributes.keys + end end def test_serialized_attribute @@ -207,7 +209,7 @@ class SerializedAttributeTest < ActiveRecord::TestCase t = Topic.create(content: "first") assert_equal("first", t.content) - t.update_column(:content, Topic.serialized_attributes["content"].dump("second")) + t.update_column(:content, Topic.type_for_attribute('content').type_cast_for_database("second")) assert_equal("second", t.content) end |