Rails does not support referential integrity foreign keys. How do I manage this?
Ideally the app should not have to deal with this; the database should. Do plugins like Foreigner have shortcomings? How is this dealt with?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a design decision for Rails ActiveRecord.
Choose a single layer of cleverness – DHH
So the answer is that referential integrity handled by the DB is not the Rails way at all.