alchemy_cms
https://github.com/magiclabs/alchemy_cms
Ruby
AlchemyCMS is a powerful, flexible and user centric Rails 5 CMS. 🧙🏻♂️
Alchemy::Admin::PagesController#create_tree
Returns a Hash of TreeNode's indexed by their page ids Grabs the array representing a tree structure of pages passed as a parameter, visits it and creates a map of TreeNodes indexed by page id featuring Nested Set ordering information consisting of the left, right, depth and parent_id indexes as well as a node's url and restricted status
Edit
git clone [email protected]:magiclabs/alchemy_cms.git
cd alchemy_cms
open app/controllers/alchemy/admin/pages_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Alchemy--Admin--PagesController-create_tree-for-pr
# Commit to gitgit add app/controllers/alchemy/admin/pages_controller.rbgit commit -m "better docs for Alchemy::Admin::PagesController#create_tree"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Alchemy--Admin--PagesController-create_tree-for-pr
hub pull-request
# Celebrate!