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

coming from `awesome_nested_set` we use `lft` for ordering. i checked the `rebuild!` method and it looks like it's calling children which then might be rendered randomly by our DB. we...

https://github.com/mceachen/closure_tree/issues/271

Based on https://github.com/ClosureTree/closure_tree/pull/338 Adds ability to set `database_type` in `initializers/closure_tree_config.rb`: ```ruby ClosureTree.configure do |config| config.database_type = :mysql end ``` The type will be used across all the closure tree models...

For an AR model `VirtualPath` used for a DB based file system, we use this excellent gem. When loading a bunch of the models after applying access control and other...

I have a model `Product` which is using closure tree on an application backed with Postgres. When we attempt to call `Product.leaves` the returning request is EXTREMELY slow on our...

Hi, we keep getting this error in our production environment. eg. ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '800291-800291-0' for key 'entry_anc_desc_idx': INSERT INTO `entry_hierarchies` (`ancestor_id`, `descendant_id`, `generations`) VALUES (800291, 800291, 0) Here...

Community help requested

Hi I have a system and i need migrate some functions, I have one table with parent_id and a need use this gem, but on run rebuild! in "rails c",...

How would one go about setting up a the association to model a human (or any organic) family tree, where each node has two parents? Is this possible with closure_tree?...

In the Creation section of the main README, there's a portion of code showing how to use `self_and_descendants` and `ancestry_path`, which are showing "First Child" in their results: ![image](https://user-images.githubusercontent.com/43934258/84665001-53861600-aeed-11ea-8f42-828f4d3d13bd.png) A...

I include `path` in the json, so I'm storing it as a string in the db. Is there a preferred method for doing this? Right now I'm doing: ```ruby after_commit...