Documentation support
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
Hi Brendon,
First, thanks for you support!
Current README lacks of description of following things:
-
#arrangemethod (#22). - Recursive queries DSL (#21). Actually, I almost decoupled this part into separate library (please, take a look at https://github.com/take-five/activerecord-hierarchical_query).
-
.acts_as_ordered_treemethod options - New iterators:
#each_with_leveland#each_without_orphans(https://github.com/take-five/acts_as_ordered_tree/commit/a734126dee0ade0f9276602ed66f9693cf89251f) - 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:
- Tree traversal (
#children,#parent,#descendants,#ancestors, recursive queries,#each_with_leveliterator etc) - Node predicates (
#leaf?,#is_ancestor_of?etc) - Node movements (
#move_to_child_of,#move_to_root,#move_to_left_ofetc) - Node callbacks:
-
before_move,before_reorder,after_move,after_reorder -
Callbacks added via
.acts_as_ordered_treemethod: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
- 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.
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:
- #arrange method (#22https://github.com/take-five/acts_as_ordered_tree/issues/22).
- Recursive queries DSL (#21https://github.com/take-five/acts_as_ordered_tree/issues/21). Actually, I almost decoupled this part into separate library (please, take a look at https://github.com/take-five/activerecord-hierarchical_query).
- .acts_as_ordered_tree method options
- New iterators: #each_with_level and #each_without_orphans (a734126https://github.com/take-five/acts_as_ordered_tree/commit/a734126dee0ade0f9276602ed66f9693cf89251f )
- New setters: #left_sibling=https://github.com/take-five/acts_as_ordered_tree/commit/845ed3133c35eb129822d5114693b3ffa8bbb065#diff-5f950f0660271e1d3936c4a950d84423R46and #right_sibling=https://github.com/take-five/acts_as_ordered_tree/commit/845ed3133c35eb129822d5114693b3ffa8bbb065#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:
- Tree traversal (#children, #parent, #descendants, #ancestors, recursive queries, #each_with_level iterator etc)
- Node predicates (#leaf?, #is_ancestor_of? etc)
- Node movements (#move_to_child_of, #move_to_root, #move_to_left_of etc)
- 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
- 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/take-five/acts_as_ordered_tree/issues/31#issuecomment-37164874 .
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
@amf9t2 version from master branch should be threadsafe
@take-five Thank you for the quick response.