bouquins-ror/app/views/layouts/_perpage.html.erb

10 lines
254 B
Plaintext
Raw Normal View History

<div class="center">
<ul class="pagination">
<% [10,20,50,100].each do |p| %>
<%= content_tag :li, class: (p == session[:current_per_page] ? "active": nil) do %>
<%= link_to p, url_for(per_page: p), remote: true %>
<% end %>
<% end %>
</ul>
</div>