Skip to content

Handle non-numeric order in _ct_after_save#486

Merged
seuros merged 1 commit intoClosureTree:masterfrom
sampatbadhe:fix/non-numeric-order-column-reordering
Mar 7, 2026
Merged

Handle non-numeric order in _ct_after_save#486
seuros merged 1 commit intoClosureTree:masterfrom
sampatbadhe:fix/non-numeric-order-column-reordering

Conversation

@sampatbadhe
Copy link
Contributor

Summary

Handle non-numeric order in _ct_after_save

Only run reorder/scope-change logic when the order column is numeric. The _ct_after_save flow was restructured to guard calls to _ct.scope_changed? and sibling reordering with _ct.order_is_numeric?, preventing errors when models use a non-numeric order column.

Fixes undefined method `_ct_reorder_siblings' for an instance of Tag

Only run reorder/scope-change logic when the order column is numeric. The _ct_after_save flow was restructured to guard calls to _ct.scope_changed? and sibling reordering with _ct.order_is_numeric?, preventing errors when models use a non-numeric order column.
@sampatbadhe
Copy link
Contributor Author

@seuros This PR is ready for review. Please take a look when you get a chance. Thank you.

@seuros seuros merged commit 5155483 into ClosureTree:master Mar 7, 2026
8 checks passed
@seuros
Copy link
Member

seuros commented Mar 7, 2026

thanks for the fix and the regression test.

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.

undefined method `_ct_reorder_siblings' for an instance of Tag

2 participants