1 class OldNodeController < ApplicationController
4 before_filter :check_api_readable
5 after_filter :compress_output
6 around_filter :api_call_handle_error, :api_call_timeout
9 node = Node.find(params[:id])
11 doc = OSM::API.new.get_xml_doc
13 node.old_nodes.each do |old_node|
14 doc.root << old_node.to_xml_node
17 render :text => doc.to_s, :content_type => "text/xml"
21 old_node = OldNode.find(:first, :conditions => {:id => params[:id], :version => params[:version]} )
23 # (RecordNotFound is not raised with find :first...)
24 render :nothing => true, :status => :not_found
28 response.headers['Last-Modified'] = old_node.timestamp.rfc822
30 doc = OSM::API.new.get_xml_doc
31 doc.root << old_node.to_xml_node
33 render :text => doc.to_s, :content_type => "text/xml"