Rails 3 Foreign Key Constraints
Does rails 3 natively support foreign key constraints (Without a plugin or 3rd party gem)?
If it doesn't what is the best way to validate foreig开发者_JAVA技巧n key constraints?
It doesn't. For Rails 3, you can use the "ValidatesExistence" gem.
Nop. But you can use Foreigner. In addition you can use Immigrant to generate a migration that includes all missing foreign keys.
精彩评论