kaminari 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kaminari might be problematic. Click here for more details.
- data/CHANGELOG +19 -0
- data/VERSION +1 -1
- data/kaminari.gemspec +2 -1
- data/lib/kaminari/helpers.rb +7 -0
- metadata +4 -3
data/CHANGELOG
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
== 0.5.0
|
2
|
+
|
3
|
+
* reset content_for :kaminari_paginator_tags before rendering #1 [hsbt]
|
4
|
+
|
5
|
+
== 0.4.0
|
6
|
+
|
7
|
+
* partialize the outer div
|
8
|
+
|
9
|
+
== 0.3.0
|
10
|
+
|
11
|
+
* suppress logging when rendering each partial
|
12
|
+
|
13
|
+
== 0.2.0
|
14
|
+
|
15
|
+
* default PER_PAGE to 25 [hsbt]
|
16
|
+
|
17
|
+
== 0.1.0
|
18
|
+
|
19
|
+
* First release
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/kaminari.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kaminari}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Akira Matsuda"]
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".rspec",
|
22
|
+
"CHANGELOG",
|
22
23
|
"Gemfile",
|
23
24
|
"Gemfile.lock",
|
24
25
|
"LICENSE.txt",
|
data/lib/kaminari/helpers.rb
CHANGED
@@ -91,6 +91,7 @@ module Kaminari
|
|
91
91
|
|
92
92
|
def to_s
|
93
93
|
suppress_logging_render_partial do
|
94
|
+
clear_content_for :kaminari_paginator_tags
|
94
95
|
@template.content_for :kaminari_paginator_tags, tagify_links.join("\n").html_safe
|
95
96
|
Paginator.new(self).to_s
|
96
97
|
end
|
@@ -101,6 +102,7 @@ module Kaminari
|
|
101
102
|
@template.send meth, *args, &blk
|
102
103
|
end
|
103
104
|
|
105
|
+
# dirty hack
|
104
106
|
def suppress_logging_render_partial(&blk)
|
105
107
|
if subscriber = ActionView::LogSubscriber.log_subscribers.detect {|ls| ls.is_a? ActionView::LogSubscriber}
|
106
108
|
class << subscriber
|
@@ -119,6 +121,11 @@ module Kaminari
|
|
119
121
|
blk.call
|
120
122
|
end
|
121
123
|
end
|
124
|
+
|
125
|
+
# another dirty hack
|
126
|
+
def clear_content_for(name)
|
127
|
+
@template.instance_variable_get('@_content_for')[name] = ActiveSupport::SafeBuffer.new
|
128
|
+
end
|
122
129
|
end
|
123
130
|
|
124
131
|
def paginate(scope, options = {}, &block)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Akira Matsuda
|
@@ -210,6 +210,7 @@ extra_rdoc_files:
|
|
210
210
|
files:
|
211
211
|
- .document
|
212
212
|
- .rspec
|
213
|
+
- CHANGELOG
|
213
214
|
- Gemfile
|
214
215
|
- Gemfile.lock
|
215
216
|
- LICENSE.txt
|