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: 362229d75869fb9d08744596eb6836e362d8bd39
4
- data.tar.gz: 2f220da49916f63494d38b840381d149890afe4f
3
+ metadata.gz: c2642afe5cdba6115566e177eb2414467e99a31b
4
+ data.tar.gz: d9c517c793c053edd25df1c4834cf0c2bf727d7f
5
5
  SHA512:
6
- metadata.gz: ed9400e7d18cc8b8f6f4c57b68d861580468564ca3340825f1ed881a0d8204ed3e060282f0a7896d546c27fe9919dd638e794042b39a67dd7258b5a86658cb74
7
- data.tar.gz: 62a895e09efda477e1781e742019c5cd2ed5a72ab929223ab22c014cbe27f6f7f86b1da95ece5e2d9e6ffdf95a7e3c0928695348e29820be34433b61245eb356
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})
@@ -1,6 +1,6 @@
1
1
  module Paginative
2
2
  module OrderingHelpers
3
- extend ActiveModel::Concern
3
+ extend ActiveSupport::Concern
4
4
 
5
5
  def sanitized_ordering(table_name, field, order)
6
6
  "#{table_name}.#{sanitize_column(field)} #{sanitize_column_direction(order)}"
@@ -1,3 +1,3 @@
1
1
  module Paginative
2
- VERSION = "0.0.22"
2
+ VERSION = "0.0.23"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginative
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Norman