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

Hi, My project has an Article model which behaves as ordered tree supported by closure_tree. Recently when creating new models, it reports the following error, does anyone meet them before?...

Hi, I have page model with tree structure. I also have scope based on status: ```ruby class Page < ApplicationRecord has_closure_tree STATUSES = %w[draft published].freeze enum status: STATUSES scope :published,...

Question

Hi there, Thanks for the awesome gem - it's exactly what I was looking for. I'm having an issue where I'm trying to add 200 child nodes and it's just...

Question

Is there a way to get a flat version of a hash tree. It doesn't have to be a hash tree, but just be ordered in the same way, and...

Question

> :touch delegates to the belongs_to annotation for the parent, so touching cascades to all children (the performance of this for deep trees isn't currently optimal). So, when a parent...

Feature request
Community help requested

I'm using ```ruby Comment.where(commentable: find_commentable).includes(:children).includes(:commenter).limit(3) ``` To fetch comments, but the `.limit(3)` only limits the number of top level comments. How can I limit the depth, and how many children...

Question

I'm currently migrating from awesome_nested_set to this beautiful gem and I noticed that `#root` for an entry returns nil until the record got saved even if a parent is set....

Feature request
Community help requested

Does closure_tree support pagination?

Feature request
Community help requested

```ruby class Tag has_closure_tree dependent: :delete_all end ``` With the code above, `@tag.destroy` only deletes `@tag`'s direct children. Its grandchildren are all orphaned, keeping old `parent_id`s which no longer exist....

Bug
Community help requested

Closure tree looks great. I need to be able to report out on count (count the number of all descendents) and do some other summarization (summing points for the node...

Question