1 class OldWayController < ApplicationController
5 before_filter :check_read_availability
6 after_filter :compress_output
10 way = Way.find(params[:id])
12 doc = OSM::API.new.get_xml_doc
14 way.old_ways.each do |old_way|
15 doc.root << old_way.to_xml_node
18 render :text => doc.to_s, :content_type => "text/xml"
19 rescue ActiveRecord::RecordNotFound
20 render :nothing => true, :status => :not_found
22 render :nothing => true, :status => :internal_server_error
28 old_way = OldWay.find(:first, :conditions => {:id => params[:id], :version => params[:version]} )
30 doc = OSM::API.new.get_xml_doc
31 doc.root << old_way.to_xml_node
33 render :text => doc.to_s, :content_type => "text/xml"
34 rescue ActiveRecord::RecordNotFound
35 render :nothing => true, :status => :not_found
37 render :nothing => true, :status => :internal_server_error