diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-29 13:17:47 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-29 13:17:47 -0600 |
commit | fb8ac4f7b8487e4bb5c241dc0ba74da30f21ce9f (patch) | |
tree | 6e4e708b0cdffbaf26a2d19e49b4b14fa0282173 /activerecord/test | |
parent | 9ca0f8da2abe735c57eacd9b687ee7c3fae3685d (diff) | |
download | rails-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.rb | 2 |
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)) |