aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJennifer Wollesen <jwollese@gmail.com>2014-12-30 22:41:54 -0700
committerJennifer Wollesen <jwollese@gmail.com>2014-12-30 22:41:54 -0700
commit0591e852d281f3d950dc27ba96cfd1e1a047be76 (patch)
treeeb874a7e6cc49e55f1a6dd822fc5e102a3b41748 /guides/source
parent070f556c3a793388307bbcabc4ee4e51741a5a66 (diff)
downloadrails-0591e852d281f3d950dc27ba96cfd1e1a047be76.tar.gz
rails-0591e852d281f3d950dc27ba96cfd1e1a047be76.tar.bz2
rails-0591e852d281f3d950dc27ba96cfd1e1a047be76.zip
Update Getting Started guide to reflect foreign key in migration [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/getting_started.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index ff6e0db480..bb80063f2b 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -1544,6 +1544,7 @@ class CreateComments < ActiveRecord::Migration
t.timestamps null: false
end
+ add_foreign_key :comments, :articles
end
end
```
@@ -1563,6 +1564,8 @@ run against the current database, so in this case you will just see:
== CreateComments: migrating =================================================
-- create_table(:comments)
-> 0.0115s
+-- add_foreign_key(:comments, :articles)
+ -> 0.0000s
== CreateComments: migrated (0.0119s) ========================================
```