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 +4 -4
- data/lib/api-pagination.rb +5 -1
- data/lib/api-pagination/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0629495ca2144885e381738a046c4256daf75498'
|
4
|
+
data.tar.gz: 251bfbe07f92e882c712691e866b950e138a7c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 361840ddd1ccc042de76ee95dcd7de2794ee6f0c6ef7091a2ad9ac00d4e4d7c64f382c13b641d9eea1b1cb70f44b444dacf8ec97a057d752f2966f605503b13b
|
7
|
+
data.tar.gz: 4061713d731ddddb21d36ebcfccc3b1e093ae7870f9383d77da5fd392f40b7a0669dbcba5fb43fc8fd35420a3ce05c594b0eed086cc08513e9c3931171c0f3ea
|
data/lib/api-pagination.rb
CHANGED
@@ -81,7 +81,11 @@ module ApiPagination
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def detect_model(collection)
|
84
|
-
collection.
|
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
|
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.
|
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-
|
11
|
+
date: 2017-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|