]> git.openstreetmap.org Git - rails.git/blob - app/controllers/old_way_controller.rb
use render proc to write out results, see if that makes things faster
[rails.git] / app / controllers / old_way_controller.rb
1 class OldWayController < ApplicationController
2   def history
3     response.headers["Content-Type"] = 'text/xml'
4     way = Way.find(params[:id])
5
6     unless way
7       render :nothing => true, :staus => 404
8       return
9     end
10     
11     doc = OSM::API.new.get_xml_doc
12
13     way.old_ways.each do |old_way|
14       doc.root << old_way.to_xml_node
15     end
16
17     render :text => doc.to_s
18   end
19
20
21 end