开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜