will_paginate 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/will_paginate/version.rb +1 -1
- data/lib/will_paginate/view_helpers/link_renderer.rb +3 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 147ccc8d263975ac53363e03b1ac0e8721a0d2dc3384541b12396335063dbdd5
|
4
|
+
data.tar.gz: 5dc1129aadadf3d861c99cebd6b664b9becf1113ec97f3ae6c2dfb58531b570d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ebb1d0564768b4380bd06fceb2f9284065c292812a26c521b401b911bb7561dde76a90ce50024a39a22b63a40fc6f20ebac43364fc989f68bca70f57f39aa20
|
7
|
+
data.tar.gz: f021cb3e9fbbc704439323d41e93897f40d536fc2adfa5ee9c9101e56e4f1a65e1ad0c9cb268ed1a4f3d1eb1d485dbe1bf5d4fd7d082a1bef2c914cbb4970970
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
will_paginate is a pagination library that integrates with Ruby on Rails, Sinatra, Hanami::View, and Sequel.
|
4
4
|
|
5
5
|
``` ruby
|
6
|
-
gem 'will_paginate', '~>
|
6
|
+
gem 'will_paginate', '~> 4.0'
|
7
7
|
```
|
8
8
|
|
9
9
|
See [installation instructions][install] on the wiki for more info.
|
@@ -41,10 +41,10 @@ New in Active Record 3:
|
|
41
41
|
|
42
42
|
``` ruby
|
43
43
|
# paginate in Active Record now returns a Relation
|
44
|
-
Post.where(:
|
44
|
+
Post.where(published: true).paginate(page: params[:page]).order(id: :desc)
|
45
45
|
|
46
46
|
# the new, shorter page() method
|
47
|
-
Post.page(params[:page]).order(
|
47
|
+
Post.page(params[:page]).order(created_at: :desc)
|
48
48
|
```
|
49
49
|
|
50
50
|
See [the wiki][wiki] for more documentation. [Report bugs][issues] on GitHub.
|
@@ -103,13 +103,12 @@ module WillPaginate
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def tag(name, value, attributes = {})
|
106
|
-
string_attributes = attributes.
|
106
|
+
string_attributes = attributes.map do |pair|
|
107
107
|
unless pair.last.nil?
|
108
|
-
|
108
|
+
%( #{pair.first}="#{CGI::escapeHTML(pair.last.to_s)}")
|
109
109
|
end
|
110
|
-
attrs
|
111
110
|
end
|
112
|
-
"<#{name}#{string_attributes}>#{value}</#{name}>"
|
111
|
+
"<#{name}#{string_attributes.compact.join("")}>#{value}</#{name}>"
|
113
112
|
end
|
114
113
|
|
115
114
|
def rel_value(page)
|
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: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-10 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 and Sequel, and includes helpers for rendering pagination links
|
@@ -47,9 +47,9 @@ licenses:
|
|
47
47
|
- MIT
|
48
48
|
metadata:
|
49
49
|
bug_tracker_uri: https://github.com/mislav/will_paginate/issues
|
50
|
-
changelog_uri: https://github.com/mislav/will_paginate/releases/tag/v4.0.
|
51
|
-
documentation_uri: https://www.rubydoc.info/gems/will_paginate/4.0.
|
52
|
-
source_code_uri: https://github.com/mislav/will_paginate/tree/v4.0.
|
50
|
+
changelog_uri: https://github.com/mislav/will_paginate/releases/tag/v4.0.1
|
51
|
+
documentation_uri: https://www.rubydoc.info/gems/will_paginate/4.0.1
|
52
|
+
source_code_uri: https://github.com/mislav/will_paginate/tree/v4.0.1
|
53
53
|
wiki_uri: https://github.com/mislav/will_paginate/wiki
|
54
54
|
post_install_message:
|
55
55
|
rdoc_options:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.4
|
72
|
+
rubygems_version: 3.5.4
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: Pagination plugin for web frameworks and other apps
|