When saving a record with belongs to is it possible to ensure that the foreign key being saved in the child record actually exists in the parent table? (Assuming its not polymorphic).
I know there are plugins that can do this, but I’m wondering if ar has a means of handling this.
Thanks!
try
validates_presence_of