You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note that the actual ordering works fine in both cases so the problem is likely in the order_is_numeric? method that controls the include of ClosureTree::NumericDeterministicOrdering.
Thanks for building a great gem !
The text was updated successfully, but these errors were encountered:
You're correct, you are fighting order_is_numeric?.
I think it's working as I wrote it, though—if the order is a simple string or symbol, and the column exists, and it's an integer, then you get the numeric ordering functionality.
I really wanted to constrain the environment that I support for numeric ordering, because it's already complicated as it is, and was concerned about the implementation complexity impact for adding support for order modifiers—it's already pretty hairy code (check out preordered!).
If you feel like it's a reasonable addition to the gem, I'm happy to reopen this and help you with a pull request.
Hi
it seems that "order" isn't enabled when I specify my acts_as_tree statement like this:
If I specify it using a string for ordering then everything works fine:
Please note that the actual ordering works fine in both cases so the problem is likely in the order_is_numeric? method that controls the include of ClosureTree::NumericDeterministicOrdering.
Thanks for building a great gem !
The text was updated successfully, but these errors were encountered: