From 2b99d7796261cdd66d2bc64f530a841cd3127556 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 7 May 2013 17:39:11 +0100 Subject: [PATCH 1/1] Don't cast object type and ID to string in case they are nil --- app/controllers/geocoder_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index b4c8e05b1..d35dd315a 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -175,8 +175,8 @@ class GeocoderController < ApplicationController min_lat,max_lat,min_lon,max_lon = place.attributes["boundingbox"].to_s.split(",") prefix_name = t "geocoder.search_osm_nominatim.prefix.#{klass}.#{type}", :default => type.gsub("_", " ").capitalize prefix = t "geocoder.search_osm_nominatim.prefix_format", :name => prefix_name - object_type = place.attributes["osm_type"].to_s - object_id = place.attributes["osm_id"].to_s + object_type = place.attributes["osm_type"] + object_id = place.attributes["osm_id"] @results.push({:lat => lat, :lon => lon, :min_lat => min_lat, :max_lat => max_lat, -- 2.43.2