]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/way_controller.rb
split_node_tags:
[rails.git] / app / controllers / way_controller.rb
index c3640609a695ec755c762182679c6a12149c14db..a7f74e50c7e66e465581c3deb575a582df5670b2 100644 (file)
@@ -15,6 +15,7 @@ class WayController < ApplicationController
         if !way.preconditions_ok?
           render :text => "", :status => :precondition_failed
         else
+         way.version = 0
           way.user_id = @user.id
           way.save_with_history!
 
@@ -77,7 +78,6 @@ class WayController < ApplicationController
 
       # if we get here, all is fine, otherwise something will catch below.  
       render :nothing => true
-      return
     rescue OSM::APIAlreadyDeletedError
       render :text => "", :status => :gone
     rescue OSM::APIPreconditionFailedError
@@ -132,7 +132,7 @@ class WayController < ApplicationController
   end
 
   def ways_for_node
-    wayids = WayNode.find(:all, :conditions => ['node_id = ?', params[:id]]).collect { |ws| ws.id }.uniq
+    wayids = WayNode.find(:all, :conditions => ['node_id = ?', params[:id]]).collect { |ws| ws.id[0] }.uniq
 
     doc = OSM::API.new.get_xml_doc