From b5e33026949c3ce78a81333e4513c8b3389dd03c Mon Sep 17 00:00:00 2001
From: Alex Reisner <alex@alexreisner.com>
Date: Sat, 20 Apr 2013 13:57:09 -0400
Subject: [PATCH] Get coordinates as an array before reversing.

This was causing an exception when `join` was called on the resulting
string.
---
 lib/geocoder/lookups/esri.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/geocoder/lookups/esri.rb b/lib/geocoder/lookups/esri.rb
index 194a504a..bb003eec 100644
--- a/lib/geocoder/lookups/esri.rb
+++ b/lib/geocoder/lookups/esri.rb
@@ -35,10 +35,10 @@ module Geocoder::Lookup
     def query_url_params(query)
       if query.reverse_geocode?
         {
-          :location => query.text.reverse.join(','),
+          :location => query.coordinates.reverse.join(','),
           :outFields => :*,
           :p => :pjson
-          }.merge(super)
+        }.merge(super)
       else
         {
           :f => :pjson,
@@ -49,4 +49,4 @@ module Geocoder::Lookup
     end  
 
   end
-end
\ No newline at end of file
+end
-- 
GitLab