aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/rails_info_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-12-22 13:36:20 -0700
committerSean Griffin <sean@thoughtbot.com>2014-12-22 13:47:11 -0700
commita03ea684efc3505647cf0327a501aa2dbb591ad2 (patch)
tree2e3836f0fe873994a5398cce7e782635f9e5077d /railties/test/rails_info_test.rb
parent82afeaf23b0cc190d1ed2c8858a11980c71ac336 (diff)
downloadrails-a03ea684efc3505647cf0327a501aa2dbb591ad2.tar.gz
rails-a03ea684efc3505647cf0327a501aa2dbb591ad2.tar.bz2
rails-a03ea684efc3505647cf0327a501aa2dbb591ad2.zip
Use the new `foreign_key` option on `references` in generators
Changes `rails g model Post user:references` from def change create_table :posts do |t| t.references :user, index: true end add_foreign_key :posts, :users end to def change create_table :posts do |t| t.references :user, index: true, foreign_key: true end end Changes `rails g migration add_user_to_posts user:references` from def change add_reference :posts, :users, index: true add_foreign_key :posts, :users end to def change add_reference :posts, :users, index: true, foreign_key: true end
Diffstat (limited to 'railties/test/rails_info_test.rb')
0 files changed, 0 insertions, 0 deletions