Skip to content

Commit 447f55c

Browse files
authored
Add mandatory 'stored' option to generated column example
The current implementation (rails#41856) required `stored: true` to be passed when using `t.virtual()` https://github.com/rails/rails/pull/41856/files#diff-5b1b920fc3bebbb1d4c144b302603e5003a1d9e5a493e3234bf764b9e26fbe30R68-R75
1 parent e1a09e6 commit 447f55c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_record_postgresql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ create_table :documents do |t|
562562
t.string :body
563563

564564
t.virtual :textsearchable_index_col,
565-
type: :tsvector, as: "to_tsvector('english', title || ' ' || body)"
565+
type: :tsvector, as: "to_tsvector('english', title || ' ' || body)", stored: true
566566
end
567567

568568
add_index :documents, :textsearchable_index_col, using: :gin, name: 'documents_idx'

0 commit comments

Comments
 (0)