Skip to content

Commit

Permalink
change concat calls in #paginated_section because of Rails 2.2 deprec…
Browse files Browse the repository at this point in the history
…ation.

this is a cherry-pick of 787555f
  • Loading branch information
mislav committed Dec 3, 2008
1 parent 9f1738f commit f2a8a59
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/will_paginate/view_helpers.rb
Expand Up @@ -141,8 +141,15 @@ def will_paginate(collection = nil, options = {})
# blocks of pagination links sharing the same ID (which is invalid HTML).
def paginated_section(*args, &block)
pagination = will_paginate(*args).to_s
content = pagination + capture(&block) + pagination
concat content, block.binding

unless ActionView::Base.respond_to? :erb_variable
concat pagination
yield
concat pagination
else
content = pagination + capture(&block) + pagination
concat(content, block.binding)
end
end

# Renders a helpful message with numbers of displayed vs. total entries.
Expand Down

0 comments on commit f2a8a59

Please sign in to comment.