Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation support #31

Open
brendon opened this issue Mar 9, 2014 · 5 comments
Open

Documentation support #31

brendon opened this issue Mar 9, 2014 · 5 comments

Comments

@brendon
Copy link

brendon commented Mar 9, 2014

Hi Alexey,

Just following up my offer to help you with your documentation.

In terms of your README, would you be able to give me a list of features that you want to highlight that aren't already in there? I can then use this as a basis for expanding on those features :)

Unfortunately I've not had any time to work on my project that uses aaot but I hope to test out your new features soon :) I guess that's the problem when the developer also has to run the company! Hopefully I'll have enough coming in to hire a developer one day! :D

Have a great day!

Brendon

@take-five
Copy link
Owner

Hi Brendon,

First, thanks for you support!

Current README lacks of description of following things:

  1. #arrange method (Arranging tree into nested hashes #22).
  2. Recursive queries DSL (Technique to get first descendants in the tree that match a query #21). Actually, I almost decoupled this part into separate library (please, take a look at https://github.com/take-five/activerecord-hierarchical_query).
  3. .acts_as_ordered_tree method options
  4. New iterators: #each_with_level and #each_without_orphans (a734126)
  5. New setters: #left_sibling= and #right_sibling=

Also I've planned to include into README comparison of hierarchical DB data structures, where benefits of Adjacency List model could be described, and where one could learn why AAOT should be used instead of, for example, awesome_nested_set.

Another thing I wanted to do with README is to split features description into separate sections:

  1. Tree traversal (#children, #parent, #descendants, #ancestors, recursive queries, #each_with_level iterator etc)
  2. Node predicates (#leaf?, #is_ancestor_of? etc)
  3. Node movements (#move_to_child_of, #move_to_root, #move_to_left_of etc)
  4. Node callbacks:
  • before_move, before_reorder, after_move, after_reorder

  • Callbacks added via .acts_as_ordered_tree method:

    class MyModel < ActiveRecord::Base
      acts_as_ordered_tree :before_add => :execute_before_add, :before_remove => :execute_before_remove
    
      def execute_before_add(new_children)
      end
    
      def execute_before_remove(destroyed_children)
      end
    end
  • Callbacks order

  1. Create and update tree node: what happens under the hood.

I'd be very grateful if you could help with at least something out of this.

@brendon
Copy link
Author

brendon commented Mar 20, 2014

Thanks Alexey, I will certainly help. Just in the process of relocating
from NZ to Canada but once we're settled there in a couple of weeks I'll
chip away at it :)

On Mon, Mar 10, 2014 at 10:29 PM, Alexey Mihaylov
[email protected]:

Hi Brendon,

First, thanks for you support!

Current README lacks of description of following things:

  1. #arrange method (Arranging tree into nested hashes #22Arranging tree into nested hashes #22).
  2. Recursive queries DSL (Technique to get first descendants in the tree that match a query #21Technique to get first descendants in the tree that match a query #21).
    Actually, I almost decoupled this part into separate library (please, take
    a look at https://github.com/take-five/activerecord-hierarchical_query).
  3. .acts_as_ordered_tree method options
  4. New iterators: #each_with_level and #each_without_orphans (a734126a734126
    )
  5. New setters: #left_sibling=845ed31#diff-5f950f0660271e1d3936c4a950d84423R46and
    #right_sibling=845ed31#diff-5f950f0660271e1d3936c4a950d84423R90

Also I've planned to include into README comparison of hierarchical DB
data structures, where benefits of Adjacency List model could be described,
and where one could learn why AAOT should be used instead of, for example,
awesome_nested_set.

Another thing I wanted to do with README is to split features description
into separate sections:

  1. Tree traversal (#children, #parent, #descendants, #ancestors,
    recursive queries, #each_with_level iterator etc)
  2. Node predicates (#leaf?, #is_ancestor_of? etc)
  3. Node movements (#move_to_child_of, #move_to_root, #move_to_left_of etc)
  4. Node callbacks:
  • before_move, before_reorder, after_move, after_reorder

    Callbacks added via .acts_as_ordered_tree method:

    class MyModel < ActiveRecord::Base
    acts_as_ordered_tree :before_add => :execute_before_add, :before_remove => :execute_before_remove

    def execute_before_add(new_children)
    end

    def execute_before_remove(destroyed_children)
    endend

    • Callbacks order
  1. Create and update tree node: what happens under the hood.

I'd be very grateful if you could help with at least something out of this.

Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-37164874
.

@amf9t2
Copy link

amf9t2 commented Jun 8, 2016

I'm evaluating this gem and also comparing with closure_tree. I was wondering if there documentation on whether this gem is thread safe or not in rails 4.2 ?
Thanks

@take-five
Copy link
Owner

@amf9t2 version from master branch should be threadsafe

@amf9t2
Copy link

amf9t2 commented Jun 8, 2016

@take-five Thank you for the quick response.

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

No branches or pull requests

3 participants