1 class OldRelationController < ApplicationController
4 before_filter :check_api_readable
5 after_filter :compress_output
6 around_filter :api_call_handle_error, :api_call_timeout
9 relation = Relation.find(params[:id])
10 doc = OSM::API.new.get_xml_doc
12 relation.old_relations.each do |old_relation|
13 doc.root << old_relation.to_xml_node
16 render :text => doc.to_s, :content_type => "text/xml"
20 if old_relation = OldRelation.where(:relation_id => params[:id], :version => params[:version]).first
21 response.last_modified = old_relation.timestamp
23 doc = OSM::API.new.get_xml_doc
24 doc.root << old_relation.to_xml_node
26 render :text => doc.to_s, :content_type => "text/xml"
28 render :nothing => true, :status => :not_found