Rework expansion of HTTP status code to work with rails 3
This commit is contained in:
parent
c00a3e948a
commit
f0d7c4a8d6
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ class ApplicationController < ActionController::Base
|
|||
request.headers['X-Error-Format'].downcase == "xml"
|
||||
result = OSM::API.new.get_xml_doc
|
||||
result.root.name = "osmError"
|
||||
result.root << (XML::Node.new("status") << interpret_status(status))
|
||||
result.root << (XML::Node.new("status") << "#{Rack::Utils.status_code(status)} #{Rack::Utils::HTTP_STATUS_CODES[status]}")
|
||||
result.root << (XML::Node.new("message") << message)
|
||||
|
||||
render :text => result.to_s, :content_type => "text/xml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue