]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/changeset_controller.rb
Replace the existing pagination of changesets in the browser with a
[rails.git] / app / controllers / changeset_controller.rb
index 7573a1803f52e54a3da136212ddc2f03113d1ad0..2834fdae9280a9e68e63b6c019b6385677d6b2c9 100644 (file)
@@ -307,11 +307,15 @@ class ChangesetController < ApplicationController
       @description = t 'changeset.list.description'
     end
 
-    @edit_pages, @edits = paginate(:changesets,
-                                   :include => [:user, :changeset_tags],
-                                   :conditions => conditions,
-                                   :order => "changesets.created_at DESC",
-                                   :per_page => 20)
+    @page = (params[:page] || 1).to_i
+    @page_size = 20
+
+    @edits = Changeset.find(:all,
+                            :include => [:user, :changeset_tags],
+                            :conditions => conditions,
+                            :order => "changesets.created_at DESC",
+                            :offset => (@page - 1) * @page_size,
+                            :limit => @page_size)
   end
 
 private