1 class OldSegmentController < ApplicationController
6 segment = Segment.find(params[:id])
8 doc = OSM::API.new.get_xml_doc
10 segment.old_segments.each do |old_segment|
11 doc.root << old_segment.to_xml_node
14 render :text => doc.to_s, :content_type => "text/xml"
15 rescue ActiveRecord::RecordNotFound
16 render :nothing => true, :status => :not_found
18 render :nothing => true, :status => :internal_server_error