开发者

how can i hide previous label in will_paginate

I can hide page links but i can't hide previous label. Any idea? Thanks.

<%= will_paginate @posts, :page_links => false 开发者_C百科%>


While it looks like you can set the label using :previous_label, I don't think you can disable it.

A workaround would be to add a CSS rule to not display the previous link.

span.prev_page, a.prev_page {
  display: none;
}


Since you cannot disable the previous label, the best workaround is to use the following:

<%= will_paginate @posts, :page_links => false, :previous_label => '' %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜