mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
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:
parent
8c168538b7
commit
a797b83f86
2 changed files with 30 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue