From 75b921d6a13405f3ea410a59b362af1dda667820 Mon Sep 17 00:00:00 2001 From: Jake Wilkins <pablo_honey@me.com> Date: Tue, 23 Jul 2013 22:09:40 +0100 Subject: [PATCH] allow query text that is actually an array. --- lib/geocoder/query.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/geocoder/query.rb b/lib/geocoder/query.rb index 3295baeb..3c2384e0 100644 --- a/lib/geocoder/query.rb +++ b/lib/geocoder/query.rb @@ -17,7 +17,11 @@ module Geocoder def sanitized_text if coordinates? - text.split(/\s*,\s*/).join(',') + if text.is_a?(Array) + text.join(',') + else + text.split(/\s*,\s*/).join(',') + end else text end -- GitLab