I have made an experimental implementation of materialized trees for ActiveRecord. In a materialized tree, each node contains an explicit path attribute. This allows for efficient subtree searches [expensive in acts_as_tree] and insertion and removal of children [expensive in acts_as_nested_set] This should be considered proof-of-concept rather than production-ready code. Requires ActiveRecord 2.1.x or later, as it makes extensive use of anonymous scopes. Code: git clone git://rubyforge.org/acts-as-matree.git Docs: http://acts-as-matree.rubyforge.org/ Regards, Brian Candler.
on 2008-11-25 22:31