Skip to content
Snippets Groups Projects
Commit 9eab2859 authored by Alex Reisner's avatar Alex Reisner
Browse files

Use abbreviated method name and regex.

parent 36d2b2ef
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ module Geocoder::Orm
#
def near_scope_options(latitude, longitude, radius = 20, options = {})
radius *= Geocoder::Calculations.km_in_mi if options[:units] == :km
if ::ActiveRecord::Base.connection.adapter_name == "SQLite"
if connection.adapter_name.match /sqlite/i
approx_near_scope_options(latitude, longitude, radius, options)
else
full_near_scope_options(latitude, longitude, radius, options)
......
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