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

Fixes .sort_by_ancestry with custom ancestry_column #656

Merged

Conversation

mitsuru
Copy link
Contributor

@mitsuru mitsuru commented Mar 28, 2023

Fixes NoMethodError: undefined method ancestry'in.sort_by_ancestry`

@kbrock
Copy link
Collaborator

kbrock commented Mar 29, 2023

2 parts are not well tested:

  • using non id for the primary key. I think rails is pretty good at translating this for us (in read_attribute behind the scenes)
  • using a column other than ancestry. These spot tests like you introduced may help a little, but we need to probably bite the bullet and create a suite that runs for a totally different ancestry column.

@kbrock
Copy link
Collaborator

kbrock commented Mar 29, 2023

Thank you.
I'm going to merge this and then introduce tests that ensure we are testing alternative ancestry columns for the whole suite

@kbrock kbrock merged commit 257728b into stefankroes:master Mar 29, 2023
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