aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_postgresql.md
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-05-28 14:26:04 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-05-28 14:26:30 +0900
commit997fd4d024474b3858f073db6c0da0604d9b2f81 (patch)
tree77e92287ed84121aeeb61b8bee1808c13c5fbe32 /guides/source/active_record_postgresql.md
parent685d8a088f9c475dc7dcec3dc704f615bd209ec1 (diff)
downloadrails-997fd4d024474b3858f073db6c0da0604d9b2f81.tar.gz
rails-997fd4d024474b3858f073db6c0da0604d9b2f81.tar.bz2
rails-997fd4d024474b3858f073db6c0da0604d9b2f81.zip
Use `add_index` instead of `execute` in guides [ci skip]
Diffstat (limited to 'guides/source/active_record_postgresql.md')
-rw-r--r--guides/source/active_record_postgresql.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_postgresql.md b/guides/source/active_record_postgresql.md
index 5eb19f5214..dee64e6439 100644
--- a/guides/source/active_record_postgresql.md
+++ b/guides/source/active_record_postgresql.md
@@ -435,7 +435,7 @@ create_table :documents do |t|
t.string 'body'
end
-execute "CREATE INDEX documents_idx ON documents USING gin(to_tsvector('english', title || ' ' || body));"
+add_index :documents, "to_tsvector('english', title || ' ' || body)", using: :gin, name: 'documents_idx'
# app/models/document.rb
class Document < ApplicationRecord