aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJon Moss <maclover7@users.noreply.github.com>2016-01-21 15:38:20 -0500
committerJon Moss <maclover7@users.noreply.github.com>2016-01-21 15:38:20 -0500
commit7fa3976867e0cb0cf433e5061937a2104639bcda (patch)
tree31d17ad9d32cdb157d9f3349cc15352d0ddc23d7 /guides/source
parent6efb39456a8ee3569f3787cc2f26c041365a0e27 (diff)
parent6b426676073159196ec876142112de31f811567c (diff)
downloadrails-7fa3976867e0cb0cf433e5061937a2104639bcda.tar.gz
rails-7fa3976867e0cb0cf433e5061937a2104639bcda.tar.bz2
rails-7fa3976867e0cb0cf433e5061937a2104639bcda.zip
Merge pull request #23165 from shakib609/fix-23157
[ci skip] fix #23157
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/getting_started.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index eae37f648d..9677ab1583 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -1540,6 +1540,11 @@ This is very similar to the `Article` model that you saw earlier. The difference
is the line `belongs_to :article`, which sets up an Active Record _association_.
You'll learn a little about associations in the next section of this guide.
+The (`:references`) keyword used in the bash command is a special data type for models.
+It creates a new column on your database table with the provided model name appended with an `_id`
+that can hold integer values. You can get a better understanding after analyzing the
+`db/schema.rb` file below.
+
In addition to the model, Rails has also made a migration to create the
corresponding database table: