What's the more accepted Rails approach?
Validate that a foreign key exists on creation/update
or
"Damage control" when we want to use the non-existent foreign key?
Initial validation requires more resources on row creation/updating, and may even be redundant when I'm creating rows systematically in my code (i.e. not user generated). However, I can smoothly write my business logic, without fear of running into bad foreign key.
And on the other hand, damage control allows for quick creation and updating, but of course, more checks and recovery in my logic.
Can you think of any other pros and cons? Perhaps there's even more alternatives than just these two doctrines.
How do experienced Rails developers handle this problem?