Preserve parameters in pagination links
authorTom Hughes <tom@compton.nu>
Fri, 7 May 2010 13:08:07 +0000 (14:08 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 7 May 2010 13:08:07 +0000 (14:08 +0100)
app/views/user/list.html.erb

index 02378b451bfc295ec92c872df8257789d1897fa9..fac7c442fd375d5152628b9aedda4ae0db226641 100644 (file)
@@ -18,7 +18,7 @@
               :count => @user_pages.current_page.last_item - @user_pages.current_page.first_item + 1
           %>
           <% if @user_pages.page_count > 1 %>
-          | <%= pagination_links_each(@user_pages, {}) { |n| link_to n, :page => n } %>
+          | <%= pagination_links_each(@user_pages, {}) { |n| link_to n, params.merge(:page => n) } %>
           <% end %>
         </td>
         <td>