Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent faulty SQL statement when #siblings is called on an unsaved records #52

Merged
merged 1 commit into from
Apr 4, 2013
Merged

prevent faulty SQL statement when #siblings is called on an unsaved records #52

merged 1 commit into from
Apr 4, 2013

Conversation

garygreyling
Copy link
Contributor

Allow #siblings to be called on unsaved models. This becomes relevant when #siblings is used in custom validations (which will run before the model has an ID). This PR fixes the faulty SQL that is constructed by #siblings when the model hasn't yet received an ID.

mceachen added a commit that referenced this pull request Apr 4, 2013
prevent faulty SQL statement when #siblings is called on an unsaved records
@mceachen mceachen merged commit 922dbbd into ClosureTree:master Apr 4, 2013
@mceachen
Copy link
Collaborator

mceachen commented Apr 4, 2013

Wow, this was a perfect pull request. Thanks!

@garygreyling
Copy link
Contributor Author

Thanks for the awesome gem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants