ruby on rails with acts_as_tree
ruby on rails 要怎麼把database裡面的資料做成樹狀圖ㄌㄟ?(folders, categories, tree, etc)
基本上database弄成parent-children的格式, model的部分用acts_as_tree達成
然後Helper裡面放上ul li或WebFXTreeItem, 就可以在view呼叫了
詳情請見下面網站 請來回各讀三遍 融會貫通後即可使用
rails 配和 ul li 做tree
http://snippets.dzone.com/posts/show/296
http://snippets.dzone.com/posts/show/1919
rails 配和xtree做tree 附migrate, model, controller, helper, rhtml
http://arden.javaeye.com/topic/40922
rails 配和xloadtree的xtree2 附controller, rxml
http://www.matrix.org.cn/thread.shtml?topicId=af148d04-843e-11db-bc5a-8183484e8085&forumId=56
用rails的acts_as_treemap 把tree用地圖方式表達
http://blog.tupleshop.com/2006/7/27/treemap-on-rails
http://wiki.rubyonrails.org/rails/pages/ActsAsTree
沒有留言:
張貼留言