I have a filter function on my page so I can see the only records that I
want to but my problem is, in my pagination I only alot 100 record a
page and everytime I click the 2 or next it always brings me the 2nd
page of the whole record not the filtered ones.
Vincent Hernandez wrote:
I have a filter function on my page so I can see the only records that I
want to but my problem is, in my pagination I only alot 100 record a
page and everytime I click the 2 or next it always brings me the 2nd
page of the whole record not the filtered ones.
better show your code.
Chen Ge wrote:
Vincent Hernandez wrote:
I have a filter function on my page so I can see the only records that I
want to but my problem is, in my pagination I only alot 100 record a
page and everytime I click the 2 or next it always brings me the 2nd
page of the whole record not the filtered ones.better show your code.
<%= link_to ‘Prev’, { :page => @nercdb_pages.current.previous } if
@nercdb_pages.current.previous %>
<% if @nercdb_pages.page_count > 100%>
<%= pagination_links @nercdb_pages %>
<%= link_to ‘Next’, { :page => @nercdb_pages.current.next } if
@nercdb_pages.current.next %>
<% else %>
<% for page in @nercdb_pages %>
<%= link_to_unless(params[:page].to_i == page.number,
page.number,
{:params => params.merge(‘page’ => page)},
{:class => ‘linked_page’}) {|link_name| “#{link_name}”} %>
<% end %>
<%= link_to ‘Next’, { :page => @nercdb_pages.current.next } if
@nercdb_pages.current.next %>