% # per_page was added in 1.23.1; gems which add to resque-server don't pass that variable along so it would crash %> <% # without a default value %> <% per_page ||= 20 %> <%if start - per_page >= 0 || start + per_page <= size%>
<% if start + per_page <= size %> « Next <% end %> <% (size / per_page.to_f - 1).ceil.downto(0).each do |page_num| %> <% if start == page_num * per_page %> <%= page_num %> <% else %> <%= page_num %> <% end %> <% end %> <% if start - per_page >= 0 %> Previous » <% end %>
<%end%>