import awesome_nested_set 2.1.5

60fe4f69e4

git-svn-id: http://svn.redmine.org/redmine/trunk@12677 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2014-01-20 05:59:16 +00:00
parent 77f29deb29
commit 6f78b3a408
24 changed files with 696 additions and 918 deletions

View File

@@ -12,8 +12,16 @@ class ScopedCategory < ActiveRecord::Base
acts_as_nested_set :scope => :organization
end
class OrderedCategory < ActiveRecord::Base
self.table_name = 'categories'
acts_as_nested_set :order_column => 'name'
end
class RenamedColumns < ActiveRecord::Base
acts_as_nested_set :parent_column => 'mother_id', :left_column => 'red', :right_column => 'black'
acts_as_nested_set :parent_column => 'mother_id',
:left_column => 'red',
:right_column => 'black',
:depth_column => 'pitch'
end
class Category < ActiveRecord::Base
@@ -69,4 +77,14 @@ end
class Broken < ActiveRecord::Base
acts_as_nested_set
end
end
class Order < ActiveRecord::Base
acts_as_nested_set
default_scope order(:name)
end
class NoDepth < ActiveRecord::Base
acts_as_nested_set
end