X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/effb1b7f4170bb7244c4dfffcbe6134fe00e2bc4..db13180c70035a81f36f843fe95e2a6326d5c554:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index c6cc3ba5f..81b8bca53 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -67,7 +67,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", :display_name => gpx_file.user.display_name, :id => gpx_file.id)) + track << (XML::Node.new("url") << url_for(:controller => "traces", :action => "show", :display_name => gpx_file.user.display_name, :id => gpx_file.id)) end else # use the anonymous track segment if the user hasn't allowed @@ -157,9 +157,7 @@ class ApiController < ApplicationController # - [0] in case some thing links to node 0 which doesn't exist. Shouldn't actually ever happen but it does. FIXME: file a ticket for this nodes_to_fetch = (list_of_way_nodes.uniq - node_ids) - [0] - unless nodes_to_fetch.empty? - nodes += Node.includes(:node_tags).find(nodes_to_fetch) - end + nodes += Node.includes(:node_tags).find(nodes_to_fetch) unless nodes_to_fetch.empty? visible_nodes = {} changeset_cache = {}