diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-14 16:34:58 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-14 16:34:58 +0200 |
commit | 69807afdd0e39025230c7c74b09db01f0cc160d6 (patch) | |
tree | 55ce8558ed72a8bba13c230d4606d113c44e2f39 /activerecord/test | |
parent | 64220a1de3574ceab70d3ed06e83ee8711ac2204 (diff) | |
parent | 2df1540143f1a57ab7aae8ff926266cc233292c5 (diff) | |
download | rails-69807afdd0e39025230c7c74b09db01f0cc160d6.tar.gz rails-69807afdd0e39025230c7c74b09db01f0cc160d6.tar.bz2 rails-69807afdd0e39025230c7c74b09db01f0cc160d6.zip |
Merge pull request #15704 from sgrif/sg-deprecate-serialized
Deprecate `serialized_attributes` without replacement
Diffstat (limited to 'activerecord/test')
-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 |