Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example migrations in Associations guide #31800

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

rlue
Copy link
Contributor

@rlue rlue commented Jan 26, 2018

This is a tiny fix — the Associations Basics guide originally included a sample migration that defined a foreign key with t.integer :author_id. I've replaced this with t.references :author.

In addition, since add_reference adds an index by default now, I've removed explicit mention of adding an index on foreign key columns.

@rafaelfranca rafaelfranca merged commit ce64619 into rails:master Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants