aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-03-19 09:16:11 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-03-19 09:16:11 -0600
commit505ad9af3e6daf7de1ed870ad0d0c7aea8aff058 (patch)
tree0693d9f41495e85ef1481c21277f7cde91449a98
parentb19990c82c6a9beff0cd058dc2ff67894a2f9ea7 (diff)
parent478c73f670061c69ac2375b421a07fb3beaf7ab5 (diff)
downloadrails-505ad9af3e6daf7de1ed870ad0d0c7aea8aff058.tar.gz
rails-505ad9af3e6daf7de1ed870ad0d0c7aea8aff058.tar.bz2
rails-505ad9af3e6daf7de1ed870ad0d0c7aea8aff058.zip
Merge pull request #19410 from y-yagi/add_reference_example
add foreign_key option to result of references column type [ci skip]
-rw-r--r--guides/source/active_record_migrations.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md
index b8db21a989..0e6c8c4f4a 100644
--- a/guides/source/active_record_migrations.md
+++ b/guides/source/active_record_migrations.md
@@ -241,7 +241,7 @@ generates
```ruby
class AddUserRefToProducts < ActiveRecord::Migration
def change
- add_reference :products, :user, index: true
+ add_reference :products, :user, index: true, foreign_key: true
end
end
```