From 0ab4800615f8c8539389427265c0a037e6814c18 Mon Sep 17 00:00:00 2001
From: Steven Harman <steven@harmanly.com>
Date: Tue, 27 Feb 2018 14:47:41 -0500
Subject: [PATCH] Make #near_scope_options public for Rails 5.2

Rails 5.2 changed the receiver within a scope from `klass` to
`relation`. With that, we no longer have private access to
Geocoder::Store::ActiveRecord#near_scope_options, and so must make it
public.

see: https://github.com/rails/rails/pull/29301
---
 lib/geocoder/stores/active_record.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/geocoder/stores/active_record.rb b/lib/geocoder/stores/active_record.rb
index 0f2187a0..e7c423a9 100644
--- a/lib/geocoder/stores/active_record.rb
+++ b/lib/geocoder/stores/active_record.rb
@@ -87,8 +87,6 @@ module Geocoder::Store
         end
       end
 
-      private # ----------------------------------------------------------------
-
       ##
       # Get options hash suitable for passing to ActiveRecord.find to get
       # records within a radius (in kilometers) of the given point.
@@ -168,6 +166,8 @@ module Geocoder::Store
         }
       end
 
+      private # ----------------------------------------------------------------
+
       ##
       # SQL for calculating distance based on the current database's
       # capabilities (trig functions?).
-- 
GitLab