]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/search_controller.rb
Fixed error handling in the name search and tidied things up a bit.
[rails.git] / app / controllers / search_controller.rb
index 0a0b27ac5fd00eac7cf3d549bd4dc42477a851f7..fc45f315aac828b9411430c80827236e81163e14 100644 (file)
@@ -99,8 +99,7 @@ class SearchController < ApplicationController
     # Fetch any nodes needed for our segments (only have matching nodes so far)
     node_ids = Array.new
     segments.each do |seg|
-      node_ids += seg.node_a
-      node_ids += seg.node_b
+      node_ids += [seg.node_a, seg.node_b]
     end
     nodes += Node.find(node_ids)