Skip to content

Commit bbc85f0

Browse files
authored
Change text to match 'belongs_to' generator change (#65)
- fix - references was changed to belongs_to but the surrounding text was not updated - change 'method' to 'column type' - 'directive' to the more specific 'association'
1 parent b5e3c70 commit bbc85f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rails6/en/chapter07-placing-orders.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Let’s start by creating the older model with a special form:
3434
$ rails generate model order user:belongs_to total:decimal
3535
----
3636

37-
The command above will generate the order model, but I’m taking advantage of the `references` method to create the corresponding foreign key for the order to belong to a user. It also adds the `belongs_to` directive into the order model. Let’s migrate the database.
37+
The command above will generate the order model, but I’m taking advantage of the `belongs_to` column type to create the corresponding foreign key for the order to belong to a user. It also adds the `belongs_to` association into the order model. Let’s migrate the database.
3838

3939
[source,bash]
4040
----
@@ -139,7 +139,7 @@ end
139139
----
140140

141141

142-
If you have been following the tutorial so far, the implementation is already there because of the `references` type we pass on the model command generator. We should add `inverse_of` option to the `placement` model for each `belongs_to` call. This gives a little boost when referencing the parent object.
142+
If you have been following the tutorial so far, the implementation is already there because of the `belongs_to` column type we pass on the model command generator. We should add `inverse_of` option to the `placement` model for each `belongs_to` call. This gives a little boost when referencing the parent object.
143143

144144
[source,ruby]
145145
.app/models/placement.rb

0 commit comments

Comments
 (0)