Skip to content
Snippets Groups Projects
Commit 5096b82f authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix: stop double-adjusting radius when km used.

Thanks github.com/hairyheron.
parent df0ee956
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@
Per-release changes to Geocoder.
== 1.0.3 (??)
* Fix bug: stop double-adjusting units when using kilometers (thanks github.com/hairyheron).
== 1.0.2 (2011 June 25)
* Add support for MongoMapper (thanks github.com/spagalloco).
......
......@@ -66,7 +66,6 @@ module Geocoder::Store
# * +:exclude+ - an object to exclude (used by the +nearbys+ method)
#
def near_scope_options(latitude, longitude, radius = 20, options = {})
radius *= Geocoder::Calculations.km_in_mi if options[:units] == :km
if connection.adapter_name.match /sqlite/i
approx_near_scope_options(latitude, longitude, radius, options)
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment