diff --git a/nested_projects/app/models/project.rb b/nested_projects/app/models/project.rb index 6131b3272..8f87295df 100644 --- a/nested_projects/app/models/project.rb +++ b/nested_projects/app/models/project.rb @@ -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 :order => 'name', :dependent => :nullify + acts_as_nested_set :order => 'name', :dependent => :destroy acts_as_attachable :view_permission => :view_files, :delete_permission => :manage_files diff --git a/nested_projects/app/views/projects/destroy.rhtml b/nested_projects/app/views/projects/destroy.rhtml index a1913c115..09d7d2a1c 100644 --- a/nested_projects/app/views/projects/destroy.rhtml +++ b/nested_projects/app/views/projects/destroy.rhtml @@ -3,8 +3,8 @@

<%=h @project_to_destroy %>
<%=l(:text_project_destroy_confirmation)%> -<% if @project_to_destroy.children.any? %> -
<%= l(:text_subprojects_destroy_warning, content_tag('strong', h(@project_to_destroy.children.sort.collect{|p| p.to_s}.join(', ')))) %> +<% if @project_to_destroy.descendants.any? %> +
<%= l(:text_subprojects_destroy_warning, content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))) %> <% end %>