diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 20:37:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 20:37:06 +0000 |
commit | ded15dfc802dec165784949d75ce70987cf5e409 (patch) | |
tree | cf027278b085b6495b1fbce379bf47c847e48ac2 /app/models | |
parent | daef6a8037ab66e1b2716ef42a197fc20228b237 (diff) | |
download | redmine-ded15dfc802dec165784949d75ce70987cf5e409.tar.gz redmine-ded15dfc802dec165784949d75ce70987cf5e409.zip |
Moved Project#hierarchy to NestedSet::Traversing.
git-svn-id: http://svn.redmine.org/redmine/trunk@13843 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 77f52737f..90ca7cbe4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -696,15 +696,6 @@ class Project < ActiveRecord::Base safe_attributes 'inherit_members', :if => lambda {|project, user| project.parent.nil? || project.parent.visible?(user)} - # Returns an array of projects that are in this project's hierarchy - # - # Example: parents, children, siblings - def hierarchy - parents = project.self_and_ancestors || [] - descendants = project.descendants || [] - project_hierarchy = parents | descendants # Set union - end - # Returns an auto-generated project identifier based on the last identifier used def self.next_identifier p = Project.order('id DESC').first |