]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/geocoder_controller.rb
Remove all use of the :text option to render
[rails.git] / app / controllers / geocoder_controller.rb
index 8ad51b234d2a7343baa60e68d4e628d7b182a2f0..a5f1810b7b05755d2262aa646a24df71239dfe69 100644 (file)
@@ -35,7 +35,7 @@ class GeocoderController < ApplicationController
     end
 
     if @sources.empty?
-      render :text => "", :status => :bad_request
+      head :bad_request
     else
       render :layout => map_layout
     end
@@ -181,7 +181,7 @@ class GeocoderController < ApplicationController
         prefix_name = t "geocoder.search_osm_nominatim.admin_levels.level#{rank}", :default => prefix_name
         place.elements["extratags"].elements.each("tag") do |extratag|
           if extratag.attributes["key"] == "place"
-            prefix_name = t "geocoder.search_osm_nominatim.prefix.place.#{extratag.attributes["value"]}", :default => prefix_name
+            prefix_name = t "geocoder.search_osm_nominatim.prefix.place.#{extratag.attributes['value']}", :default => prefix_name
           end
         end
       end