X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/21d713005ff57df8d3069bd9caf322b7debaf053..76cf302cd0436dcc91dc44f5b1d60f1e408c456e:/app/controllers/browse_controller.rb?ds=sidebyside diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index 0103516ff..119792167 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -70,8 +70,8 @@ class BrowseController < ApplicationController @prev = Changeset.where("id < ?", @changeset.id).order(:id => :desc).first if @changeset.user.data_public? - @next_by_user = @changeset.user.changesets.where("id > ?", @changeset.id).order(:id => :asc).first - @prev_by_user = @changeset.user.changesets.where("id < ?", @changeset.id).order(:id => :desc).first + @next_by_user = @changeset.user.changesets.where("id > ?", @changeset.id).reorder(:id => :asc).first + @prev_by_user = @changeset.user.changesets.where("id < ?", @changeset.id).reorder(:id => :desc).first end rescue ActiveRecord::RecordNotFound render :action => "not_found", :status => :not_found