Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't save self-referential belongs_to #184
If I have a Foo model with belongs_to :foo association that references the same model, I cannot save an instance of that model if its foo_id=id (because that foo doesn't exist in the db yet). Is there any way we can skip this validation in this specific case?
I can provide a complete code example if needed.