pragma 1.2.1 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pragma/operation/defaults.rb +2 -1
- data/lib/pragma/operation/index.rb +10 -1
- data/lib/pragma/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: 3bfc105db005eb2c91fd2c88e0b8696c94222e9a
|
4
|
+
data.tar.gz: 29b65f0c0eb9dc5907a7cd04416965d946500049
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64a1899d2e286c76633f7bee050f8ed8e882ba35dc9ed1af58aa5b16544688e4254ca1ca04ca94cfce3615d92a4c446b887bf27446feb54af85f54cc1cfb196
|
7
|
+
data.tar.gz: 5f43c159ec595cc137c846f4f42f9d8ce66b0df54e51df65929ce02e834b42694e51671445f7cdab10544c317383fc5f5b29a9caa95a7ac879d81dffd323b6ca
|
@@ -10,7 +10,16 @@ module Pragma
|
|
10
10
|
|
11
11
|
def call
|
12
12
|
context.records = authorize_collection(find_records)
|
13
|
-
|
13
|
+
|
14
|
+
begin
|
15
|
+
context.records = context.records.paginate(page: page, per_page: per_page)
|
16
|
+
rescue RangeError => e
|
17
|
+
respond_with!(
|
18
|
+
status: :bad_request,
|
19
|
+
error_type: :invalid_page,
|
20
|
+
error_message: e.message
|
21
|
+
)
|
22
|
+
end
|
14
23
|
|
15
24
|
respond_with(
|
16
25
|
resource: decorate(context.records),
|
data/lib/pragma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Desantis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01
|
11
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pragma-operation
|