forked from rails/acts_as_nested_set
NOTICE: official repository moved to https://github.com/bbommarito/acts_as_nested_set
binhgreat/acts_as_nested_set
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ActsAsNestedSet ============== This acts_as extension provides Nested Set functionality. Nested Set is similiar to Tree, but with the added feature that you can select the children and all of their descendents with a single query. A good use case for this is a threaded post system, where you want to display every reply to a comment without multiple selects. Example ======= class Product < ActiveRecord::Base acts_as_nested_set end # In this branch, I has changed a little, so that, rgt and lft are updated automatically. # And, you need set :parent_id first, otherwise, root object will be created node = Node.new(:parent_id => 20) node.data = ... node.save Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
About
NOTICE: official repository moved to https://github.com/bbommarito/acts_as_nested_set
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Ruby 100.0%