From: Tom Hughes Date: Sat, 10 Mar 2012 13:05:39 +0000 (+0000) Subject: Specify the username when generating a URL for a trace X-Git-Tag: live~5748 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b255a333c5a1dc1bb1932a00d952fbb457e38478 Specify the username when generating a URL for a trace --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 53e14202c..002bd73b8 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -68,7 +68,7 @@ class ApiController < ApplicationController if gpx_file.identifiable? track << (XML::Node.new("name") << gpx_file.name) track << (XML::Node.new("desc") << gpx_file.description) - track << (XML::Node.new("url") << url_for(:controller => 'trace', :action => 'view', :id => gpx_file.id)) + track << (XML::Node.new("url") << url_for(:controller => 'trace', :action => 'view', :display_name => gpx_file.user.display_name, :id => gpx_file.id)) end else # use the anonymous track segment if the user hasn't allowed