]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/way_controller.rb
Fix for #1565. Added a couple of tests and fixed another issue with re-used placehold...
[rails.git] / app / controllers / way_controller.rb
index 25d535d79e1e396bca2d4e98049efaf7da5bc07b..80c75d91c3644d4c72fb04c8ea8758687217fa5a 100644 (file)
@@ -22,6 +22,7 @@ class WayController < ApplicationController
         render :nothing => true, :status => :method_not_allowed
       end
     rescue OSM::APIError => ex
+      logger.warn request.raw_post
       render ex.render_opts
     end
   end
@@ -56,6 +57,7 @@ class WayController < ApplicationController
         render :nothing => true, :status => :bad_request
       end
     rescue OSM::APIError => ex
+      logger.warn request.raw_post
       render ex.render_opts
     rescue ActiveRecord::RecordNotFound
       render :nothing => true, :status => :not_found
@@ -87,7 +89,7 @@ class WayController < ApplicationController
 
       if way.visible
         nd_ids = way.nds + [-1]
-        nodes = Node.find(:all, :conditions => "visible = 1 AND id IN (#{nd_ids.join(',')})")
+        nodes = Node.find(:all, :conditions => ["visible = ? AND id IN (#{nd_ids.join(',')})", true])
 
         # Render
         doc = OSM::API.new.get_xml_doc