Skip to content

Commit 8964ec4

Browse files
authored
Update engines.md
For Comment model generator, use article:references instead of article_id:integer
1 parent 4867559 commit 8964ec4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guides/source/engines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ model, a comment controller, and then modify the articles scaffold to display
440440
comments and allow people to create new ones.
441441

442442
From the engine root, run the model generator. Tell it to generate a
443-
`Comment` model, with the related table having two columns: an `article_id` integer
444-
and `text` text column.
443+
`Comment` model, with the related table having two columns: an `article` references
444+
column and `text` text column.
445445

446446
```bash
447-
$ bin/rails generate model Comment article_id:integer text:text
447+
$ bin/rails generate model Comment article:references text:text
448448
```
449449

450450
This will output the following:

0 commit comments

Comments
 (0)