X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cb87f02642d0097ebc067ca1f9371dde274a41e3..870e9e41e3c2b23b8b5e6730d91ea9ad1c89463d:/app/controllers/changeset_controller.rb diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 898afae4a..8fbbe1362 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -216,6 +216,12 @@ class ChangesetController < ApplicationController changesets = conditions_closed(changesets, params["closed"]) changesets = conditions_ids(changesets, params["changesets"]) + # sort and limit the changesets + changesets = changesets.order("created_at DESC").limit(100) + + # preload users, tags and comments + changesets = changesets.preload(:user, :changeset_tags, :comments) + # create the results document results = OSM::API.new.get_xml_doc