Adds :order option to acts_as_nested_tree so that children are sorted alphabetically when the tree is rebuilt.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2156 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-20 17:58:55 +00:00
parent 01ab34d401
commit efff5dff9b
3 changed files with 20 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ class Project < ActiveRecord::Base
:join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}",
:association_foreign_key => 'custom_field_id'
acts_as_nested_set :dependent => :nullify
acts_as_nested_set :order => 'name', :dependent => :nullify
acts_as_attachable :view_permission => :view_files,
:delete_permission => :manage_files