Module: Geocoder::Store::ActiveRecord::ClassMethods
- Defined in:
- lib/geocoder/stores/active_record.rb
Overview
Methods which will be class methods of the including class.
Instance Method Summary collapse
Instance Method Details
#distance_from_sql(location, *args) ⇒ Object
78 79 80 81 82 83 |
# File 'lib/geocoder/stores/active_record.rb', line 78 def distance_from_sql(location, *args) latitude, longitude = Geocoder::Calculations.extract_coordinates(location) if Geocoder::Calculations.coordinates_present?(latitude, longitude) distance_sql(latitude, longitude, *args) end end |