module Geocoder::Store::Base
def nearbys(radius = 20, options = {})
Takes the same options hash as the near class method (scope).
Get nearby geocoded objects.
#
def nearbys(radius = 20, options = {}) return [] unless geocoded? if options.is_a?(Symbol) options = {:units => options} warn "DEPRECATION WARNING: The units argument to the nearbys method has been replaced with an options hash (same options hash as the near scope). You should instead call: obj.nearbys(#{radius}, :units => #{options[:units]}). The old syntax will not be supported in Geocoder v1.0." end options.merge!(:exclude => self) self.class.near(self, radius, options) end