module Geocoder::Store::ActiveRecord
def nearbys(radius = 20, options = {})
Returns nil if the object is not geocoded.
Takes the same options hash as the near class method (scope).
Get nearby geocoded objects.
#
def nearbys(radius = 20, options = {}) return nil unless geocoded? options.merge!(:exclude => self) unless send(self.class.primary_key).nil? self.class.near(self, radius, options) end