]> git.openstreetmap.org Git - rails.git/blob - app/controllers/old_node_controller.rb
left a bit in previous commit that shouldn't have been there.
[rails.git] / app / controllers / old_node_controller.rb
1 class OldNodeController < ApplicationController
2
3   def history
4     response.headers["Content-Type"] = 'text/xml'
5     node = Node.find(params[:id])
6
7     unless node
8       render :nothing => true, :staus => 404
9       return
10     end
11
12     doc = OSM::API.new.get_xml_doc
13
14     node.old_nodes.each do |old_node|
15       doc.root << old_node.to_xml_node
16     end
17
18     render :text => doc.to_s
19   end
20
21
22 end