will_paginate 3.0.10 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/will_paginate/railtie.rb +9 -3
- data/lib/will_paginate/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: aaded127564427ed76f61b5e0881544bd0a084e6
|
4
|
+
data.tar.gz: a1207de02008a0a66bca8645ecbdca4c35aec64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de3a178b36b74c21a1c0760770be96f68662e580a74a8b40bc23e10374fbf83ab1f820e24a67d2a46aa6fe9fd42f5c2953df8569b11a142a9ee2e44a74428db
|
7
|
+
data.tar.gz: d4e29c4c113fbb3a4e17069026fdaf0abddc8a4ff506dfcb584c7d4320280109ebf5e9540726408ef19473cf9db7274d25de307469cc6842568d1ce487afbacc
|
@@ -38,9 +38,15 @@ module WillPaginate
|
|
38
38
|
alias_method :status_code, :status_code_with_paginate
|
39
39
|
end
|
40
40
|
def status_code_with_paginate(exception = @exception)
|
41
|
-
if exception.
|
42
|
-
|
43
|
-
|
41
|
+
actual_exception = if exception.respond_to?(:cause)
|
42
|
+
exception.cause
|
43
|
+
elsif exception.respond_to?(:original_exception)
|
44
|
+
exception.original_exception
|
45
|
+
else
|
46
|
+
exception
|
47
|
+
end
|
48
|
+
|
49
|
+
if actual_exception.is_a?(WillPaginate::InvalidPage)
|
44
50
|
Rack::Utils.status_code(:not_found)
|
45
51
|
else
|
46
52
|
original_method = method(:status_code_without_paginate)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: will_paginate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: will_paginate provides a simple API for performing paginated queries
|
14
14
|
with Active Record, DataMapper and Sequel, and includes helpers for rendering pagination
|