Remove all use of the :text option to render

It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
This commit is contained in:
Tom Hughes 2017-06-02 16:24:28 +01:00
parent 9b89d4eefe
commit ff97501ed0
17 changed files with 101 additions and 103 deletions

View file

@ -33,13 +33,13 @@ class SearchController < ApplicationController
if do_nodes
response.headers["Error"] = "Searching of nodes is currently unavailable"
render :text => "", :status => :service_unavailable
head :service_unavailable
return false
end
unless value
response.headers["Error"] = "Searching for a key without value is currently unavailable"
render :text => "", :status => :service_unavailable
head :service_unavailable
return false
end
@ -94,6 +94,6 @@ class SearchController < ApplicationController
doc.root << rel.to_xml_node(nil, changeset_cache, user_display_name_cache)
end
render :text => doc.to_s, :content_type => "text/xml"
render :xml => doc.to_s
end
end