X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/137509534304be853ab01ca554111c524a9a1bca..8348493ccb02fd0bb3f46733d8176b503f9f9883:/app/controllers/relation_controller.rb diff --git a/app/controllers/relation_controller.rb b/app/controllers/relation_controller.rb index 575cca419..93573b95f 100644 --- a/app/controllers/relation_controller.rb +++ b/app/controllers/relation_controller.rb @@ -64,7 +64,6 @@ class RelationController < ApplicationController end def delete -#XXX check if member somewhere! begin relation = Relation.find(params[:id]) new_relation = Relation.from_xml(request.raw_post) @@ -143,8 +142,7 @@ class RelationController < ApplicationController render :text => doc.to_s, :content_type => "text/xml" else - - render :text => "", :status => :gone + render :nothing => true, :status => :gone end rescue ActiveRecord::RecordNotFound @@ -167,8 +165,10 @@ class RelationController < ApplicationController render :text => doc.to_s, :content_type => "text/xml" else - render :nothing => true, :status => :bad_request + render :text => "You need to supply a comma separated list of ids.", :status => :bad_request end + rescue ActiveRecord::RecordNotFound + render :text => "Could not find one of the relations", :status => :not_found end def relations_for_way