remotty-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460e7b9cd95d277288b4414a7f01eecd2c10a3da
|
4
|
+
data.tar.gz: 24207c3ddeaeca781f0188fee059e895c9c5ca2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a98d0fe0dc11b9387ad2402fb66950eb7abdfa92c59d287d8b9a1f84426d88b384f3c3e68b75143288749589a29e79448572116c420fb19dfb571295bd25ccc
|
7
|
+
data.tar.gz: 8d020998211ef05fd5022d8e5ce12d951e9945d8e71a4c242906dcb77df87b4991c8866ea94cb9c7939e056ec4aa3608848ccc70798d1b25c049b5d356531844
|
@@ -20,17 +20,20 @@ module Remotty::BaseApplicationController
|
|
20
20
|
protected
|
21
21
|
|
22
22
|
# paging - kaminari dependency
|
23
|
-
def render_paging(items)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
def render_paging(items, options = nil)
|
24
|
+
page = {
|
25
|
+
json: items,
|
26
|
+
meta_key: 'page',
|
27
|
+
meta: {
|
28
|
+
total_count: items.total_count,
|
29
|
+
current_page: items.current_page,
|
30
|
+
per_page: items.limit_value
|
31
|
+
},
|
32
|
+
root: 'items'
|
28
33
|
}
|
34
|
+
page.merge!(options) unless options.nil?
|
29
35
|
|
30
|
-
render
|
31
|
-
meta_key: 'page',
|
32
|
-
meta: meta,
|
33
|
-
root: 'items'
|
36
|
+
render page
|
34
37
|
end
|
35
38
|
|
36
39
|
# error
|