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

Avoid assuming the primary key column is called "id" #117

Merged
merged 1 commit into from
Oct 6, 2014

Conversation

jasoncodes
Copy link
Contributor

The preordered traversal code currently assumes the tree model’s primary is called “id” (which can be changed using self.primary_key = :foo).

This PR replaces the hard-coded “id” references with calls to closure_tree’s quoted_id_column_name.

@seuros
Copy link
Member

seuros commented Aug 21, 2014

LGTM @mceachen

@mceachen
Copy link
Collaborator

Nice catch—I'll merge and push a new version soon. Thanks!

@mceachen mceachen merged commit f9138e0 into ClosureTree:master Oct 6, 2014
@mceachen
Copy link
Collaborator

mceachen commented Oct 6, 2014

Sorry for the delay—thanks again for the PR, it's part of v5.1.0 that just got released.

@jasoncodes
Copy link
Contributor Author

Cheers.

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.

3 participants