]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/geocoder_controller.rb
oops, removing debugging code
[rails.git] / app / controllers / geocoder_controller.rb
index 1b2ae340b58c38912fe76edb0827b62a6dabf3a4..556cfb36ad4ae53bf04fbadd3097cbdc9bb31dbd 100644 (file)
@@ -3,6 +3,7 @@ class GeocoderController < ApplicationController
   require 'net/http'
   require 'rexml/document'
 
+  before_filter :authorize_web
   before_filter :set_locale
 
   def search
@@ -76,7 +77,7 @@ class GeocoderController < ApplicationController
       data = response.split(/\s*,\s+/) # lat,long,town,state,zip
       @results.push({:lat => data[0], :lon => data[1],
                      :zoom => APP_CONFIG['postcode_zoom'],
-                     :prefix => "#{data[2]}, #{data[3]}, ",
+                     :prefix => "#{data[2]}, #{data[3]},",
                      :name => data[4]})
     end