Skip to content
Browse files

change concat calls in #paginated_section because of Rails 2.2 deprec…

…ation.

this is a cherry-pick of 787555f
  • Loading branch information...
1 parent 9f1738f commit f2a8a597bed50c66f7d1fe187e75fc44d1d28973 @mislav mislav committed Dec 4, 2008
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/will_paginate/view_helpers.rb
View
11 lib/will_paginate/view_helpers.rb
@@ -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.

0 comments on commit f2a8a59

Please sign in to comment.
Something went wrong with that request. Please try again.