1 class OldRelationController < ApplicationController
5 before_filter :check_read_availability
6 after_filter :compress_output
10 relation = Relation.find(params[:id])
11 doc = OSM::API.new.get_xml_doc
13 relation.old_relations.each do |old_relation|
14 doc.root << old_relation.to_xml_node
17 render :text => doc.to_s, :content_type => "text/xml"
18 rescue ActiveRecord::RecordNotFound
19 render :nothing => true, :status => :not_found
21 render :nothing => true, :status => :internal_server_error
27 old_relation = OldRelation.find(:first, :conditions => {:id => params[:id], :version => params[:version]} )
29 doc = OSM::API.new.get_xml_doc
30 doc.root << old_relation.to_xml_node
32 render :text => doc.to_s, :content_type => "text/xml"
33 rescue ActiveRecord::RecordNotFound
34 render :nothing => true, :status => :not_found
36 render :nothing => true, :status => :internetal_service_error