From: Vincent Hernandez on 12 Apr 2010 20:02 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. -- Posted via http://www.ruby-forum.com/.
From: Chen Ge on 12 Apr 2010 21:44 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. -- Posted via http://www.ruby-forum.com/.
From: Vincent Hernandez on 12 Apr 2010 22:27 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| "<span class='unlinked_page'>#{link_name}</span>"} %> <% end %> <%= link_to 'Next', { :page => @nercdb_pages.current.next } if @nercdb_pages.current.next %> -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: Thread to handle an execute command and wait for output Next: [ANN]VTD-XML 2.8 |