]> git.openstreetmap.org Git - rails.git/commitdiff
Preserve parameters in pagination links.
authorTom Hughes <tom@compton.nu>
Thu, 19 Nov 2009 00:20:19 +0000 (00:20 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 19 Nov 2009 00:20:19 +0000 (00:20 +0000)
app/views/changeset/_changeset_paging_nav.html.erb

index 7b99b60eaa422e9fa17cd9ca22f1a4b1563dcc5c..52c3decb890e3754fa68ac3d4a831e514696fa76 100644 (file)
@@ -1,7 +1,7 @@
 <p>
 
 <% if @page > 1 %>
-<%= link_to t('changeset.changeset_paging_nav.previous'), :page => @page - 1 %>
+<%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
 <% else %>
 <%= t('changeset.changeset_paging_nav.previous') %>
 <% end %>
@@ -11,7 +11,7 @@
 <% if @edits.size < @page_size %>
 <%= t('changeset.changeset_paging_nav.next') %>
 <% else %>
-<%= link_to t('changeset.changeset_paging_nav.next'), :page => @page + 1 %>
+<%= link_to t('changeset.changeset_paging_nav.next'), params.merge({ :page => @page + 1 }) %>
 <% end %>
 
 </p>