]> git.openstreetmap.org Git - rails.git/blob - app/controllers/old_segment_controller.rb
innitial by tag / by user code
[rails.git] / app / controllers / old_segment_controller.rb
1 class OldSegmentController < ApplicationController
2
3   def history
4     response.headers["Content-Type"] = 'application/xml'
5     segment = Segment.find(params[:id])
6
7     unless segment
8       render :nothing => true, :staus => 404
9       return
10     end
11
12     doc = get_xml_doc
13
14     segment.old_segments.each do |old_segment|
15       doc.root << old_segment.to_xml_node
16     end
17
18     render :text => doc.to_s
19   end
20
21
22
23
24
25 end