api-pagination 4.6.1 → 4.6.2

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: d16ca31c576d642c0b2110effb4ee77bdf60c693
4
- data.tar.gz: 6e4992bdc9067026484e952a44230a83f1c6eacd
3
+ metadata.gz: '0629495ca2144885e381738a046c4256daf75498'
4
+ data.tar.gz: 251bfbe07f92e882c712691e866b950e138a7c8d
5
5
  SHA512:
6
- metadata.gz: 20c99b689079c16fe6eb9f2052c9fc7229d70ba0310c47d6d0b30739a175b6f41c8c86b8a87f23da32038dae5321c47a4a8e9490a24a43b426716ceae6cb51bd
7
- data.tar.gz: ceab1f71e2d225a28500d925caee3f77e7b097994679970c6949ad84db02e836ac4567e232bc3cf5bcb8bd970895149581966b8365e73051ebcb287902be901f
6
+ metadata.gz: 361840ddd1ccc042de76ee95dcd7de2794ee6f0c6ef7091a2ad9ac00d4e4d7c64f382c13b641d9eea1b1cb70f44b444dacf8ec97a057d752f2966f605503b13b
7
+ data.tar.gz: 4061713d731ddddb21d36ebcfccc3b1e093ae7870f9383d77da5fd392f40b7a0669dbcba5fb43fc8fd35420a3ce05c594b0eed086cc08513e9c3931171c0f3ea
@@ -81,7 +81,11 @@ module ApiPagination
81
81
  end
82
82
 
83
83
  def detect_model(collection)
84
- collection.first.class
84
+ if collection.respond_to?(:table_name)
85
+ collection.table_name.singularize.capitalize.constantize
86
+ else
87
+ collection.first.class
88
+ end
85
89
  end
86
90
  end
87
91
  end
@@ -2,7 +2,7 @@ module ApiPagination
2
2
  class Version
3
3
  MAJOR = 4
4
4
  MINOR = 6
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.1
4
+ version: 4.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec