1 class OldNodeController < ApplicationController
4 skip_before_filter :verify_authenticity_token
5 before_filter :check_api_readable
6 after_filter :compress_output
7 around_filter :api_call_handle_error, :api_call_timeout
10 node = Node.find(params[:id])
12 doc = OSM::API.new.get_xml_doc
14 node.old_nodes.each do |old_node|
15 doc.root << old_node.to_xml_node
18 render :text => doc.to_s, :content_type => "text/xml"
22 if old_node = OldNode.where(:node_id => params[:id], :version => params[:version]).first
23 response.last_modified = old_node.timestamp
25 doc = OSM::API.new.get_xml_doc
26 doc.root << old_node.to_xml_node
28 render :text => doc.to_s, :content_type => "text/xml"
30 render :nothing => true, :status => :not_found