grape-pagination 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,6 @@ module Grape::Pagination
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def paginate
|
23
|
-
header TOTAL_HEADER, total
|
24
23
|
header LINK_HEADER, LinkHeader.new(request.url, page_params).to_rfc5988
|
25
24
|
collection.paginate(page_params)
|
26
25
|
end
|
@@ -33,14 +32,6 @@ module Grape::Pagination
|
|
33
32
|
@page_params ||= params.slice(:page, :per_page).to_h.symbolize_keys
|
34
33
|
end
|
35
34
|
|
36
|
-
def total
|
37
|
-
options[:total] || total_proc.call(collection)
|
38
|
-
end
|
39
|
-
|
40
|
-
def total_proc
|
41
|
-
options[:total_proc] || configuration.total_proc
|
42
|
-
end
|
43
|
-
|
44
35
|
def configuration
|
45
36
|
Grape::Pagination.configuration
|
46
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-pagination
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: grape
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: 3890741433359288304
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
segments:
|
141
141
|
- 0
|
142
|
-
hash:
|
142
|
+
hash: 3890741433359288304
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
145
|
rubygems_version: 1.8.23
|