amatsuda/kaminari — pull request #363 by monshq (2013-03-06 12:04:18+00:00)
Title: No easy way to make a link with html in it

I've been looking for a way to add a link for a next page. `link_to_next_page` wouldn't do because it only adds a link with a string within, but I need to add an html code there:
```html

Some string

```
Normally you could've passed a block and render it, but kaminari [uses](https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/helpers/action_view_extension.rb#L42) `link_to_unless` in links to next and previous page, so block is not even executed if current page isn't first or last.

Alternate way could be to use templates, but they are way to massive to achieve this simple task. Besides, there are some situations where you just can't replace links with templates (or implementation of it gets really ugly), e.g. when you have links to previous page and next page before and after paginating items correspondingly.

There are two possible solutions to this problem, as I see it.
First is that `link_to_next_page` could use `link_to` instead of `link_to_unless`. That would make sense but will probably break existing functionality, so it's not good.
Second is that `link_to_next_page` could take an option, which would make it use `link_to`. The code would grow a bit clumsy but you'll be able to make links with inner html in it without much trouble as it is now.

I am ready to implement and PR either version. Or, if I am missing something, I am open to suggestions.