deprecated children_count replaced
git-svn-id: http://redmine.rubyforge.org/svn/trunk@188 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -65,6 +65,6 @@ class Project < ActiveRecord::Base
|
||||
protected
|
||||
def validate
|
||||
errors.add(parent_id, " must be a root project") if parent and parent.parent
|
||||
errors.add_to_base("A project with subprojects can't be a subproject") if parent and projects_count > 0
|
||||
errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user