![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
mongo_mapper_acts_as_tree
Advanced tools
= mongo_mapper_acts_as_tree
This is a port of classic Rails {acts_as_tree}[http://github.com/rails/acts_as_tree] to Mongo Mapper. Specify this MongoMapper plugin if you want to model a tree structure by providing a parent association and a children association. This requires that you have a foreign key, which by default is called parent_id.
It has (almost) the same functionality and passes the original test-suite. Scope needs to be defined as symbol or array of symbols. It does not work (by principle) for Embedded Documents. Please note, it is not yet optimized and therefore issues more queries than necessary.
== Installation
mongo_mapper_acts_as_list is available as RubyGem:
gem install mongo_mapper_acts_as_tree
== Example
class Category include MongoMapper::Document
plugin MongoMapper::Plugins::ActsAsTree
key :parent_id, ObjectId
acts_as_tree :order => :name
end
Example: root _ child1 _ subchild1 _ subchild2
root = Category.create(:name => "root") child1 = root.children.create(:name => "child1") subchild1 = child1.children.create(:name => "subchild1")
root.parent # => nil child1.parent # => root root.children # => [child1] root.children.first.children.first # => subchild1
== Note on Patches/Pull Requests
== Copyright
Original Rails acts_as_tree Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
FAQs
Unknown package
We found that mongo_mapper_acts_as_tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.