]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/segment_controller.rb
geocoder controller - handles geocoding
[rails.git] / app / controllers / segment_controller.rb
index 58e98bef224288ec0cb5df3fff45235112f0b23a..76cb5cebb44e6fbea5e97c64135b92282b25b108 100644 (file)
@@ -10,7 +10,6 @@ class SegmentController < ApplicationController
       segment = Segment.from_xml(request.raw_post, true)
 
       if segment
-        
         segment.user_id = @user.id
 
         segment.from_node = Node.find(segment.node_a.to_i)
@@ -21,7 +20,7 @@ class SegmentController < ApplicationController
         end
 
         if segment.save_with_history
-          render :text => segment.id
+          render :text => segment.id.to_s
         else
           render :nothing => true, :status => 500
         end
@@ -86,7 +85,7 @@ class SegmentController < ApplicationController
     ids = params['segments'].split(',').collect {|s| s.to_i }
     if ids.length > 0
       segmentlist = Segment.find(ids)
-      doc = get_xml_doc
+      doc = OSM::API.get_xml_doc
       segmentlist.each do |segment|
         doc.root << segment.to_xml_node
       end