closure_tree icon indicating copy to clipboard operation
closure_tree copied to clipboard

Easily and efficiently make your ActiveRecord models support hierarchies

Results 102 closure_tree issues
Sort by recently updated
recently updated
newest added

This is a proposal for the hierarchies_table template. https://github.com/ClosureTree/closure_tree/blob/8550ddab5671a0d3b002e954796de44826585728/lib/generators/closure_tree/templates/create_hierarchies_table.rb.erb I feel that the unique compound index of `ancestor_id` and `descendant_id`, is needed and `generations` is redundant. However, considering performance, I...

While execute spec with appraisal, I caught error. ``` An error occurred while loading ./spec/closure_tree/matcher_spec.rb. - Did you mean? rspec ./spec/closure_tree/has_closure_tree_root_spec.rb Failure/Error: ActiveRecord::Base.establish_connection LoadError: Error loading the 'sqlite3' Active Record...

Hey! First of all - big apologies if such issue was already created at some point. I'm having a hard time trying to even google for it as i'm unsure...

Rails 7.2 has been released, and the main branch is moving towards Rails 8.0.

Although the query issued by the closure_tree_class.has_tree call has an optional argument `limit_depth` to reduce the load, the cost remains excessively high when dealing with the hierarchy table containing huge...

This pull request addresses potential SQL ambiguity issues in ORDER BY clauses by introducing and using a new method: fully_qualified_order_by. ## Changes made: - Introduced fully_qualified_order_by, which combines the quoted...

Having `has_closure_tree_root` is quite useful, when there is a root instance that collects all children. However I have the use case where a related model has multiple roots. This is...

Within the current implementation with root ordering there is a problem described in the [readme](https://github.com/ClosureTree/closure_tree?tab=readme-ov-file#ordering-roots) > With numeric ordering, root nodes are, by default, assigned order values globally across the...

Hi, Thanks for all the work maintaining this library, your work is very much appreciated. Is there a way (or plans to add) a way to depth limit the `_preordered`...