aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-06-29 13:17:47 -0600
committerSean Griffin <sean@thoughtbot.com>2014-06-29 13:17:47 -0600
commitfb8ac4f7b8487e4bb5c241dc0ba74da30f21ce9f (patch)
tree6e4e708b0cdffbaf26a2d19e49b4b14fa0282173 /activerecord/test
parent9ca0f8da2abe735c57eacd9b687ee7c3fae3685d (diff)
downloadrails-fb8ac4f7b8487e4bb5c241dc0ba74da30f21ce9f.tar.gz
rails-fb8ac4f7b8487e4bb5c241dc0ba74da30f21ce9f.tar.bz2
rails-fb8ac4f7b8487e4bb5c241dc0ba74da30f21ce9f.zip
Use the type object for sending JSON to the database
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/json_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/json_test.rb b/activerecord/test/cases/adapters/postgresql/json_test.rb
index e44afea33a..50135151c2 100644
--- a/activerecord/test/cases/adapters/postgresql/json_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/json_test.rb
@@ -77,7 +77,7 @@ class PostgresqlJSONTest < ActiveRecord::TestCase
column = JsonDataType.columns_hash["payload"]
data = "{\"a_key\":\"a_value\"}"
- hash = column.class.string_to_json data
+ hash = column.type_cast_from_database(data)
assert_equal({'a_key' => 'a_value'}, hash)
assert_equal({'a_key' => 'a_value'}, column.type_cast_from_database(data))