acts asã 使ã£ã¦ã¿ãã è¤å²¡å²³ä¹â(xibbar) ã¢ã¸ã§ã³ã ⢠acts as list ⢠acts as tree ⢠acts as nested set ⢠better nested set acts as listã¨ã¯ ⢠Railsã«æ¨æºã§ã¤ãã¦ãã ⢠é åãæ±ãã¨ãã«ä¾¿å© ã©ããã£ã¦ä½¿ãï¼ â¢ positionã¨ããintegeråã®ã«ã©ã ã追å ⢠modelã«acts_as_listã追å class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.column :name, :string t.column :position, :integer end end def self.down drop_table :users end end c
Better nested set This plugin provides an ehanced acts_as_nested_set mixin for ActiveRecord, the object-db mapping layer of the framework RubyOnRails. The original nested set feature seems to be quite old and missed some necessary functionalities. Details This acts provides Nested Set functionality. Nested Set is a smart way to implement an ordered tree, with the added feature that you can select
http://agilewebdevelopment.com/plugins/betternestedset ããã«ããã¾ããã©ããããã®ãã¨ããã¨ãacts_as_nested_setãæ¡å¼µã㦠便å©ã«ãããã®ã§ãã acts_as_nested_set + acts_as_tree + 便å©= better_nested_set ã¨ãã£ãæãã§ãã ã¤ã³ã¹ãã¼ã«æ¹æ³ ./script/plugin install http://opensource.symetrie.com/svn/better_nested_set/trunkãã ãtrunkã¨ããååã«ãªãã®ã§ããªãã¼ã ããæ¹ãããæ°ããã¾ãã 使ããã¡ã½ããä¸è¦§ move_to_child_of å¥ã®å ´æã«ã¶ãä¸ãã move_to_right_ofå¥ã®å ´æã«ã¶ãä¸ãã move_to_left_ofå¥ã®å ´æã«ã¶ãä¸ãã root
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}