diff app/controllers/.svn/text-base/projects_controller.rb.svn-base @ 41:7f0e922c8982 luisf

merged with new version from trunk
author luisf
date Fri, 19 Nov 2010 14:45:28 +0000
parents 94944d00e43c
children af80e5618e9b
line wrap: on
line diff
--- a/app/controllers/.svn/text-base/projects_controller.rb.svn-base	Thu Nov 18 17:50:11 2010 +0000
+++ b/app/controllers/.svn/text-base/projects_controller.rb.svn-base	Fri Nov 19 14:45:28 2010 +0000
@@ -93,7 +93,7 @@
           flash[:notice] = l(:notice_successful_create)
           redirect_to :controller => 'projects', :action => 'settings', :id => @project
         }
-        format.xml  { head :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
+        format.xml  { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
       end
     else
       respond_to do |format|
@@ -125,13 +125,13 @@
         if validate_parent_id && @project.copy(@source_project, :only => params[:only])
           @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
           flash[:notice] = l(:notice_successful_create)
-          redirect_to :controller => 'admin', :action => 'projects'
+          redirect_to :controller => 'projects', :action => 'settings'
         elsif !@project.new_record?
           # Project was created
           # But some objects were not copied due to validation failures
           # (eg. issues from disabled trackers)
           # TODO: inform about that
-          redirect_to :controller => 'admin', :action => 'projects'
+          redirect_to :controller => 'projects', :action => 'settings'
         end
       end
     end