ActsAsTree-扩展ActiveRecord以添加简单支持,以将项目组织成父子关系。-Ruby开发

时间:2021-05-27 11:39:38
【文件属性】:
文件名称:ActsAsTree-扩展ActiveRecord以添加简单支持,以将项目组织成父子关系。-Ruby开发
文件大小:17KB
文件格式:ZIP
更新时间:2021-05-27 11:39:38
Ruby ORM/ODM ActsAsTree ActsAsTree扩展了ActiveRecord,以添加对将项目组织成父子关系的简单支持。 默认情况下,ActsAsTree需要一个称为parent_id的外键列。 示例类Catego ActsAsTree ActsAsTree扩展了ActiveRecord,以添加对将项组织成父子关系的简单支持。 默认情况下,ActsAsTree需要一个称为parent_id的外键列。 示例类Category “ root”)child1 = root.children.create(“名称” =>“ child1”)subchild1 = child1 .children.create(“ name” =>“ subchild1”)root.parent#=> nil child1.parent#=> root root.children#=>
【文件预览】:
acts_as_tree-master
----.travis.yml(1KB)
----Rakefile(489B)
----test()
--------acts_as_tree_test.rb(19KB)
----gemfiles()
--------rails-3.0.gemfile(141B)
--------rails-3.1.gemfile(167B)
--------rails-4.2.gemfile(150B)
--------rails-4.0.gemfile(126B)
--------rails-3.2.gemfile(168B)
--------rails-4.1.gemfile(126B)
--------rails-5.1.gemfile(112B)
--------rails-5.2.gemfile(112B)
--------rails-6.0.gemfile(100B)
--------rails-5.0.gemfile(102B)
----acts_as_tree.gemspec(1KB)
----Gemfile(72B)
----.gitignore(64B)
----lib()
--------acts_as_tree()
--------acts_as_tree.rb(12KB)
----README.md(5KB)

网友评论