rest_framework 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rest_framework/controller_mixins/models.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b74a4553ac1297795e4bb614e395e6b21a8c3ba18ef11ca36594e76bc51c3aac
|
4
|
+
data.tar.gz: 948044b9b604fe754aad64db509351478d869b298a87d382e19dd3a95eba7087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42780202ca53a1e52a6c866e01c0ae428c2f54bafe3c4f2e0f7be599139f3159cade939346f8018ddc4e3b2a4ad37dbbedef5377c97e1df1e84c2f09dbd6a31d
|
7
|
+
data.tar.gz: 6e50a220a25ed28f1f1b0d71fdaf73a1f8fe6caf5c3130779621cb4528a5774008e6c379ad0a98c12132740d962f3dac786f0a17e9691c6b5a7e09586f96bf6e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.9
|
@@ -238,10 +238,16 @@ module RESTFramework::ListModelMixin
|
|
238
238
|
|
239
239
|
# Handle pagination, if enabled.
|
240
240
|
if self.class.paginator_class
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
241
|
+
# If there is no `max_page_size`, `page_size_query_param` is not `nil`, and the page size is
|
242
|
+
# set to "0", then skip pagination.
|
243
|
+
unless !self.class.max_page_size &&
|
244
|
+
self.class.page_size_query_param &&
|
245
|
+
params[self.class.page_size_query_param] == "0"
|
246
|
+
paginator = self.class.paginator_class.new(data: records, controller: self)
|
247
|
+
page = paginator.get_page
|
248
|
+
serialized_page = self.serialize(page)
|
249
|
+
return paginator.get_paginated_response(serialized_page)
|
250
|
+
end
|
245
251
|
end
|
246
252
|
|
247
253
|
return records
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory N. Schmit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|