aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2014-12-07 08:54:41 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2014-12-07 08:54:41 +0900
commit42abc9d35b436283ea62e824a4ccefbe99c8c524 (patch)
tree4982afb019eeafeabbd392c52f3a9061ad57f0be /guides/source
parent01c3b92ac3e75eb5165e87e6b0ec05b5d8b73fa9 (diff)
downloadrails-42abc9d35b436283ea62e824a4ccefbe99c8c524.tar.gz
rails-42abc9d35b436283ea62e824a4ccefbe99c8c524.tar.bz2
rails-42abc9d35b436283ea62e824a4ccefbe99c8c524.zip
[ci skip] add `enable_extension` to PostgreSQL hstore example
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_postgresql.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/guides/source/active_record_postgresql.md b/guides/source/active_record_postgresql.md
index a2681a80e9..446be1c6d1 100644
--- a/guides/source/active_record_postgresql.md
+++ b/guides/source/active_record_postgresql.md
@@ -83,9 +83,12 @@ Book.where("array_length(ratings, 1) >= 3")
* [type definition](http://www.postgresql.org/docs/9.3/static/hstore.html)
+NOTE: you need to enable the `hstore` extension to use hstore.
+
```ruby
# db/migrate/20131009135255_create_profiles.rb
ActiveRecord::Schema.define do
+ enable_extension 'hstore' unless extension_enabled?('hstore')
create_table :profiles do |t|
t.hstore 'settings'
end