Specify the username when generating a URL for a trace

This commit is contained in:
Tom Hughes 2012-03-10 13:05:39 +00:00
parent a87540a5dd
commit b255a333c5

View file

@ -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