Module: Geocoder::Store::ActiveRecord::ClassMethods
- Defined in:
- lib/geo-calculator/store/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
79 80 81 82 83 84 |
# File 'lib/geo-calculator/store/active_record.rb', line 79 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 |