开发者

Rails 3 Foreign Key Constraints

开发者 https://www.devze.com 2023-02-15 05:10 出处:网络
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 Rail

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消