mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user