amatsuda/kaminari — pull request #417 by lecky (2013-07-02 03:38:13+00:00)
Title: allow any HTML attributes on any links

@billychan @zzak @yuki24 @amatsuda

As everything we want to add in are supported natively by the Rails link_to helper. So what we need to do is just have one attribute called :options.

So in _first_page.html.erb it becomes:
```ruby
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, {remote: remote}.merge(options||={}) %>

```
Then you can add any attributes you want:
```ruby
<%= paginate @users, options: {remote: true, class: 'ajax_index', data: {pjax: true} } %>
```

In this way, it will not break the existing code and can still achieve what we need. And the PR title can be changed to "allow any HTML attributes on any links" :smile:

By using this way, we can even remove the original remote: remote as by default link_to helper :remote is false. Much cleaner.

So it becomes:
```ruby
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, options||={} %>

```

This PR only added in the options support.