1 class OldWayController < ApplicationController
4 before_filter :check_api_readable
5 after_filter :compress_output
6 around_filter :api_call_handle_error, :api_call_timeout
9 way = Way.find(params[:id])
11 doc = OSM::API.new.get_xml_doc
13 way.old_ways.each do |old_way|
14 doc.root << old_way.to_xml_node
17 render :text => doc.to_s, :content_type => "text/xml"
21 if old_way = OldWay.where(:way_id => params[:id], :version => params[:version]).first
22 response.last_modified = old_way.timestamp
24 doc = OSM::API.new.get_xml_doc
25 doc.root << old_way.to_xml_node
27 render :text => doc.to_s, :content_type => "text/xml"
29 render :nothing => true, :status => :not_found