hal_api-rails 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hal_api/controller/resources.rb +5 -1
- data/lib/hal_api/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8678b3ab4a5bfb9bc83b5f4bf013d803d5de6104
|
4
|
+
data.tar.gz: b0aa82a4fece7b45148c32682b9d5b1e32544b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd471e3c6021411822b4a066d9274f7f7968189b2c3e5f076559e929d1d36f4c1b39fe06cd88d5435f3bc77852acda9374b033326c09e220a5c675ac5092feb0
|
7
|
+
data.tar.gz: afa2bb422706e177a168d3431a092e37c8dbce20e521d0c8214dc9d827d2dc4c7f88d8d29f4bcc857ccc8210d10b330e8f62d91f1c0a0525121bbb453bdef7e9
|
@@ -98,7 +98,11 @@ module HalApi::Controller::Resources
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def paged(arel)
|
101
|
-
|
101
|
+
if params[:per].to_i <= 0
|
102
|
+
arel.page(params[:page]).per(Kaminari.config.default_per_page)
|
103
|
+
else
|
104
|
+
arel.page(params[:page]).per(params[:per])
|
105
|
+
end
|
102
106
|
end
|
103
107
|
|
104
108
|
def scoped(res)
|