paginative 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2642afe5cdba6115566e177eb2414467e99a31b
|
4
|
+
data.tar.gz: d9c517c793c053edd25df1c4834cf0c2bf727d7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea2dc1b6140adb5b00fe17ac2c3a4dc45e5048e6e1f554b9c6f1e1c6bffb89f3dc81f374366c11bd2d39736be27ee9b48eba74aed37475578f64ca69ea4f0421
|
7
|
+
data.tar.gz: a65fe086f1b61fa33c7cb9cf16ae73d7f611e7bd30d7d0d9ef65076c5cf0dafe1d3bdb96f0954a92d5517be2f6bfed94f077671447127aecdebee9d88bd933d7
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Paginative
|
2
2
|
module ModelExtension
|
3
3
|
extend ActiveSupport::Concern
|
4
|
-
include Paginative::OrderingHelpers
|
5
4
|
|
6
5
|
included do
|
6
|
+
include Paginative::OrderingHelpers
|
7
|
+
|
7
8
|
def self.by_distance_from(latitude, longitude, distance=0, limit=25)
|
8
9
|
return [] unless latitude.present? && longitude.present?
|
9
10
|
distance_sql = send(:distance_sql, latitude.to_f, longitude.to_f, {:units => :km, select_bearing: false})
|
data/lib/paginative/version.rb
CHANGED