miscellany 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miscellany/controller/sliced_response.rb +6 -1
- data/lib/miscellany/version.rb +1 -1
- 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: d8272b6520386bb2e45ef6a4ae8cc6c2c349e465ca8eea10867df3c42c80c7c3
|
4
|
+
data.tar.gz: aeb81bc5bb198c2f64589c1d416369bd101de5d1db074682e40f66247c2035d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f6ac9e74cacbdb4dd5d990a47c72608181eb005b4a9c3de81b46666bf314a246fa799c29d97753519822318740adf32fa2db63450d2d70e2abc4fb4a38c09de
|
7
|
+
data.tar.gz: 99f033c54af54257ef660e889f34f683e080fe4e16baeb9d1f201fcf0091561c6d2fd5d26b582a57b9ab91b2d7c0fd3c8e72f8fc8e02f7425b0a395b4bcc7e9f
|
@@ -198,7 +198,12 @@ module Miscellany
|
|
198
198
|
elsif items.is_a?(ActiveRecord::Relation)
|
199
199
|
offset, limit = slice_bounds
|
200
200
|
limit -= offset unless limit.nil?
|
201
|
-
|
201
|
+
|
202
|
+
query = items
|
203
|
+
sort_clause = sort_sql
|
204
|
+
query = query.order(Arel.sql(sort_clause)) if sort_clause.present?
|
205
|
+
|
206
|
+
query.limit(limit).offset(offset).to_a
|
202
207
|
elsif defined?(Miscellany::ComplexQuery) && items.is_a?(Miscellany::ComplexQuery)
|
203
208
|
offset, limit = slice_bounds
|
204
209
|
limit -= offset unless limit.nil?
|
data/lib/miscellany/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miscellany
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Knapp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|