Displaying
<%= collection.offset + 1 %>
-
<%= collection.offset + collection.size %>
of
<%= collection.total_entries %>
<%= link_to " ", first_page_path, :id => "first_page_link" %>
<%= link_to " ", previous_page_path, :id => "previous_page_link" %>
<% url = URI.parse(current_page_path) %>
<% form_tag url.path, :method => :get, :class => "current_page" do %>
<% url.query.to_s.split('&').each do |p|; k, v = p.split('=') %>
<%= hidden_field_tag(k, CGI::unescape(v.to_s), :id => "pagination_hidden_#{k}") unless k == "page" %>
<% end %>
<%= label_tag "current_page_number", "Page" %>
<%= text_field_tag "page", collection.current_page, :id => "current_page_number", :size => 3 %>
of
<%= collection.total_pages %>
<% end %>
<%= link_to " ", next_page_path, :id => "next_page_link" %>
<%= link_to " ", last_page_path, :id => "last_page_link" %>