X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/15841e8d2ad12c538ef10f0d0782a25d1d7ff156..17e6e69c39072d8e6cb316b75b311e89c92cca45:/app/controllers/api/users_controller.rb diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 3180cabcc..e6922e0a0 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -37,11 +37,8 @@ module Api end def gpx_files - doc = OSM::API.new.get_xml_doc - current_user.traces.reload.each do |trace| - doc.root << trace.to_xml_node - end - render :xml => doc.to_s + @traces = current_user.traces.reload + render "api/traces/trace", :content_type => "application/xml" end private