Skip to content

Commit

Permalink
fixes #11 always create the paginator's own output_buffer rather than…
Browse files Browse the repository at this point in the history
… reusing the template's one

because the template's output_buffer is not yet instantiated in some cases
  • Loading branch information
amatsuda committed Feb 20, 2011
1 parent ac3223b commit 4809198
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions lib/kaminari/helpers.rb
Expand Up @@ -17,10 +17,6 @@ def partial_exists?(name) #:nodoc:
resolver.find_all(*args_for_lookup(name)).present?
end

def output_buffer #:nodoc:
@template.instance_variable_get('@output_buffer')
end

private
def context
@template.instance_variable_get('@lookup_context')
Expand Down
2 changes: 1 addition & 1 deletion lib/kaminari/tags.rb
Expand Up @@ -73,7 +73,7 @@ class Paginator < Tag
def initialize(template, window_options) #:nodoc:
@template, @options = template, window_options.reverse_merge(template.options)
# so that this instance can actually "render". Black magic?
@output_buffer = @template.output_buffer
@output_buffer = ActionView::OutputBuffer.new
end

# render given block as a view template
Expand Down

0 comments on commit 4809198

Please sign in to comment.