kaminari 0.10.0 → 0.10.1

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 CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.10.1
2
+
3
+ * Fixed a bug that the whole <nav> section was not rendered in some cases
4
+ [GarthSnyder]
5
+
1
6
  == 0.10.0
2
7
 
3
8
  * Railtie initializer name is "kaminari" from now
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.0
1
+ 0.10.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kaminari}
8
- s.version = "0.10.0"
8
+ s.version = "0.10.1"
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"]
@@ -73,13 +73,17 @@ module Kaminari
73
73
  def initialize(template, window_options) #:nodoc:
74
74
  @template, @options = template, window_options.reverse_merge(template.options)
75
75
  # so that this instance can actually "render". Black magic?
76
- @output_buffer = @template.output_buffer || ActionView::OutputBuffer.new
76
+ @output_buffer = @template.output_buffer
77
+ if @output_buffer.nil?
78
+ @output_buffer, @return_buffer = ActionView::OutputBuffer.new, true
79
+ end
77
80
  end
78
81
 
79
82
  # render given block as a view template
80
83
  def render(&block)
81
84
  instance_eval &block if @options[:num_pages] > 1
82
- nil
85
+ # return the output text only if the output_buffer was created inside this instance
86
+ @return_buffer ? @output_buffer : nil
83
87
  end
84
88
 
85
89
  # enumerate each page providing PageProxy object as the block parameter
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: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 0
10
- version: 0.10.0
9
+ - 1
10
+ version: 0.10.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Akira Matsuda