will_paginate 3.0.3视图助手文档状态,":remote - 将数据远程或远程属性设置为true,具体取决于link_to的实现"(sic,https://github.com/mislav/will_paginate/wiki/the -will_paginate-view-helper).
通过Rails 3.2使用"<%= will_paginate @collection,:remote => true%>"渲染:
<div class="pagination" remote="true">
<span class="previous_page disabled">? Previous</span>
<em class="current">1</em>
<a href="/people?page=2" rel="next">2</a>
<a class="next_page" href="/people?page=2" rel="next">Next ?</a>
</div>
Run Code Online (Sandbox Code Playgroud)
即:没有数据远程属性应用于链接tag.s,但是没有应用于分页div(看起来像文档中描述的未知选项属性).这里的最后一篇文章(https://github.com/mislav/will_paginate/pull/100)指出:"我看到这个拉取请求,并且引用的请求都是针对2.3版本的.3.0版本已经包含此功能.有人应该关闭这个."
因此,我期望在will_paginate生成的分页链接标记中看到"data-remote ='true'",因此它可以由Rails UJS处理.
我是不是基地还是有人有这个工作?或者,仍然需要新的LinkRenderer,如下所述:http: //jhonynyc.tumblr.com/post/4348012015/making-will-paginate-ajaxable-in-rails-3#notes
谢谢.