Can't save self-referential belongs_to #184

Closed
ajselvig opened this Issue Jan 24, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@ajselvig
Contributor

ajselvig commented Jan 24, 2016

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.

@nviennot nviennot closed this in 6dd4461 Jan 24, 2016

@ajselvig

This comment has been minimized.

Show comment
Hide comment
@ajselvig

ajselvig Jan 24, 2016

Contributor

A gentleman and a scholar, as usual. Thanks!

Contributor

ajselvig commented Jan 24, 2016

A gentleman and a scholar, as usual. Thanks!

@nviennot

This comment has been minimized.

Show comment
Hide comment
@nviennot

nviennot Jan 24, 2016

Owner

ahah thanks andy :D

Owner

nviennot commented Jan 24, 2016

ahah thanks andy :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment