paginate-responder 1.6.0.b0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paginate-responder/version.rb +1 -1
- data/lib/responders/paginate_responder.rb +11 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1957ee0bd1397a8d501df89778815cb7b031a3e2
|
4
|
+
data.tar.gz: a79a6353386070aafacd8cbb713d415d70f2f226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87b48047d3b7c092d568eeccb596961cf8f09e80e3774a712345a4cd92c7603ff48aafb2e0c6de95402c1d8be4820b7d4278a8007379ccbad0a8a207641307ba
|
7
|
+
data.tar.gz: 1acb18988a31fca3f45bb9063c5018ed728364b529924afa45746d9f59e80eccbc1e5e373cd8a2252a7001ce44fe02e4d342aef29e7bdd46321a865de8d01dfd
|
@@ -9,8 +9,8 @@ module Responders
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def paginate!
|
12
|
-
adapter = ::Responders::PaginateResponder.
|
13
|
-
@resource = adapter.
|
12
|
+
adapter = ::Responders::PaginateResponder.init(self)
|
13
|
+
@resource = adapter.paginate! if adapter
|
14
14
|
end
|
15
15
|
|
16
16
|
class << self
|
@@ -22,6 +22,15 @@ module Responders
|
|
22
22
|
@adpaters ||= ::Set.new
|
23
23
|
end
|
24
24
|
|
25
|
+
def init(responder)
|
26
|
+
if responder.controller.respond_to?(:pagination_adapter_init)
|
27
|
+
return responder.controller.pagination_adapter_init(responder)
|
28
|
+
end
|
29
|
+
|
30
|
+
adapter = find(responder)
|
31
|
+
adapter.new(responder) if adapter
|
32
|
+
end
|
33
|
+
|
25
34
|
def find(responder)
|
26
35
|
adapters.find do |adapter|
|
27
36
|
adapter.suitable?(responder.resource, responder)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paginate-responder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.0
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
@@ -250,9 +250,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
252
252
|
requirements:
|
253
|
-
- - "
|
253
|
+
- - ">="
|
254
254
|
- !ruby/object:Gem::Version
|
255
|
-
version:
|
255
|
+
version: '0'
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project:
|
258
258
|
rubygems_version: 2.5.1
|