Specify the username when generating a URL for a trace
authorTom Hughes <tom@compton.nu>
Sat, 10 Mar 2012 13:05:39 +0000 (13:05 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 10 Mar 2012 13:05:39 +0000 (13:05 +0000)
app/controllers/api_controller.rb

index 53e14202c051558090c820d91f17f6169d89d4bc..002bd73b881fef24dfe07acbd40581a161665ff9 100644 (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