Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rails 3 paginated_section with no pages #90

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

fabioyamate commented Nov 25, 2010

Hi, I'm using will_paginate with Rails 3, but when using paginated_section with a collection containing only one page, it outputs escaped HTML. Investigating in code, the problem is converting 'nil' to string with 'to_s', which produces html_safe? to be false. Then, concatenating non-safe string with a safe string (capture(&block)) generates a non-safe string, which causes it to be escaped.

I'm sending a pull request with a fix that I made to deal with non-safe string.

Thanks

@mislav mislav closed this in ca42e3c Jul 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment