]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/changesets_controller.rb
Merge pull request #4156 from AntonKhorev/bootstrap-code-direction-fix
[rails.git] / app / controllers / api / changesets_controller.rb
index 66014042718126ceca06b3bd3f864a7bb6985be6..0a49a95f4e01e98a99c07566f6da92282448e09b 100644 (file)
@@ -172,9 +172,9 @@ module Api
 
       # sort the changesets
       changesets = if params[:order] == "oldest"
 
       # sort the changesets
       changesets = if params[:order] == "oldest"
-                     changesets.order("created_at ASC")
+                     changesets.order(:closed_at => :asc)
                    else
                    else
-                     changesets.order("created_at DESC")
+                     changesets.order(:closed_at => :desc)
                    end
 
       # limit the result
                    end
 
       # limit the result