fix #1173 and fix #1175 where renaming a project or context to an existing name using REST will fail with status 406

This commit is contained in:
Reinier Balt 2011-06-10 23:29:42 +02:00
parent 8c168538b7
commit a797b83f86
2 changed files with 30 additions and 14 deletions

View file

@ -120,7 +120,14 @@ class ContextsController < ApplicationController
end
else
respond_to do |format|
format.js
format.js
format.xml {
if @saved
render :xml => @context.to_xml( :except => :user_id )
else
render :text => "Error on update: #{@context.errors.full_messages.inject("") {|v, e| v + e + " " }}", :status => 409
end
}
end
end
end