1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Replacing plugin to gem

This commit is contained in:
Lucas Caton 2013-01-19 15:49:28 -02:00
parent 46752092ef
commit 2b7a621e6a

View file

@ -474,7 +474,7 @@ class ExampleMigration < ActiveRecord::Migration
t.references :category
end
#add a foreign key
# add a foreign key
execute <<-SQL
ALTER TABLE products
ADD CONSTRAINT fk_products_categories
@ -1011,7 +1011,7 @@ with foreign key constraints in the database.
Although Active Record does not provide any tools for working directly with
such features, the `execute` method can be used to execute arbitrary SQL. You
could also use some plugin like
could also use some gem like
[foreigner](https://github.com/matthuhiggins/foreigner) which add foreign key
support to Active Record (including support for dumping foreign keys in
`db/schema.rb`).