diff --git a/lib/geocoder/calculations.rb b/lib/geocoder/calculations.rb index dcfe3fd164f549cfe61eea6365a392f1483711dc..0152cbe0e118f350c50475e5b9df3bc95d1e54f7 100644 --- a/lib/geocoder/calculations.rb +++ b/lib/geocoder/calculations.rb @@ -24,7 +24,7 @@ module Geocoder # Calculate the distance between two points on Earth (Haversine formula). # Takes two sets of coordinates and an options hash: # - # <tt>:units</tt> :: <tt>:mi</tt> (default) or <tt>:km</tt> + # * <tt>:units</tt> - <tt>:mi</tt> (default) or <tt>:km</tt> # def distance_between(lat1, lon1, lat2, lon2, options = {}) diff --git a/lib/geocoder/orms/active_record.rb b/lib/geocoder/orms/active_record.rb index 7b585940e18b647c07a604ed558655b64cb97a0e..1194f8dca9b9187f83fc1737d89278e7e00efea5 100644 --- a/lib/geocoder/orms/active_record.rb +++ b/lib/geocoder/orms/active_record.rb @@ -53,12 +53,14 @@ module Geocoder::Orm # records within a radius (in miles) of the given point. # Options hash may include: # - # +units+ :: <tt>:mi</tt> (default) or <tt>:km</tt> - # +exclude+ :: an object to exclude (used by the #nearbys method) - # +order+ :: column(s) for ORDER BY SQL clause - # +limit+ :: number of records to return (for LIMIT SQL clause) - # +offset+ :: number of records to skip (for OFFSET SQL clause) - # +select+ :: string with the SELECT SQL fragment (e.g. “id, nameâ€) + # * +:units+ - <tt>:mi</tt> (default) or <tt>:km</tt>; to be used + # for interpreting radius as well as the +distance+ attribute which + # is added to each found nearby object + # * +:select+ - string with the SELECT SQL fragment (e.g. “id, nameâ€) + # * +:order+ - column(s) for ORDER BY SQL clause + # * +:limit+ - number of records to return (for LIMIT SQL clause) + # * +:offset+ - number of records to skip (for OFFSET SQL clause) + # * +: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