Skip to content
Snippets Groups Projects
Commit a7ab0642 authored by Jee Lee's avatar Jee Lee
Browse files

Convert options[:units] to symbol

parent eb74db30
No related branches found
No related tags found
No related merge requests found
...@@ -103,6 +103,9 @@ module Geocoder::Store ...@@ -103,6 +103,9 @@ module Geocoder::Store
# * +:exclude+ - an object to exclude (used by the +nearbys+ method) # * +:exclude+ - an object to exclude (used by the +nearbys+ method)
# #
def near_scope_options(latitude, longitude, radius = 20, options = {}) def near_scope_options(latitude, longitude, radius = 20, options = {})
if options[:units]
options[:units] = options[:units].to_sym
end
options[:units] ||= (geocoder_options[:units] || Geocoder.config.units) options[:units] ||= (geocoder_options[:units] || Geocoder.config.units)
select_distance = options.fetch(:select_distance, true) select_distance = options.fetch(:select_distance, true)
options[:order] = "" if !select_distance && !options.include?(:order) options[:order] = "" if !select_distance && !options.include?(:order)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment