Permalink
Browse files

doc, pg `hstore` and `json` columns are mapped as `Hash`. [ci skip]

Closes #15141.
  • Loading branch information...
1 parent e83a6ff commit 779ff5cdeb8aa1cffb112e0d40baa57b33a29844 @senny senny committed May 16, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 guides/source/upgrading_ruby_on_rails.md
@@ -393,6 +393,14 @@ start using the more precise `:plain:`, `:html`, and `:body` options instead.
Using `render :text` may pose a security risk, as the content is sent as
`text/html`.
+### PostgreSQL json and hstore datatypes
+
+Rails 4.1 will map `json` and `hstore` columns to a string-keyed Ruby `Hash`.
+In earlier versions a `HashWithIndifferentAccess` was used. This means that
+symbol access is no longer supported. This is also the case for
+`store_accessors` based on top of `json` or `hstore` columns. Make sure to use
+string keys consistently.
+
Upgrading from Rails 3.2 to Rails 4.0
-------------------------------------

0 comments on commit 779ff5c

Please sign in to comment.