From 1b6583048ada5a508e0f0d6b1e7685aa43a91596 Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Sun, 11 Mar 2012 18:28:44 -0400 Subject: [PATCH] Call false_condition instead of :id => false. Should have been part of commit eba79f2. --- lib/geocoder/stores/active_record.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/geocoder/stores/active_record.rb b/lib/geocoder/stores/active_record.rb index 40974b51..7a0a4733 100644 --- a/lib/geocoder/stores/active_record.rb +++ b/lib/geocoder/stores/active_record.rb @@ -49,7 +49,7 @@ module Geocoder::Store # scope :within_bounding_box, lambda{ |bounds| sw_lat, sw_lng, ne_lat, ne_lng = bounds.flatten if bounds - return where(:id => false) unless sw_lat && sw_lng && ne_lat && ne_lng + return where(false_condition) unless sw_lat && sw_lng && ne_lat && ne_lng spans = "#{geocoder_options[:latitude]} BETWEEN #{sw_lat} AND #{ne_lat} AND " spans << if sw_lng > ne_lng # Handle a box that spans 180 "#{geocoder_options[:longitude]} BETWEEN #{sw_lng} AND 180 OR #{geocoder_options[:longitude]} BETWEEN -180 AND #{ne_lng}" -- GitLab