Make ways_for_node work with the multipart primary key stuff.
authorTom Hughes <tom@compton.nu>
Mon, 28 Jan 2008 08:54:45 +0000 (08:54 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 28 Jan 2008 08:54:45 +0000 (08:54 +0000)
app/controllers/way_controller.rb

index c3640609a695ec755c762182679c6a12149c14db..4b52ad3f04829f575e7ecf37c132507ca4f0ba28 100644 (file)
@@ -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