From bc07bf484b7ea69c70882ea735551a2f7755aaa6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 27 Nov 2011 17:40:23 +0000 Subject: [PATCH] Make search work again --- app/controllers/search_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 408b4a662..622ebb1ce 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -48,6 +48,8 @@ class SearchController < ApplicationController nodes = nodes.where(:current_node_tags => { :k => type }) if type nodes = nodes.where(:current_node_tags => { :v => value }) if value nodes = nodes.limit(100) + else + nodes = Array.new end # Matching for way tags table @@ -56,6 +58,8 @@ class SearchController < ApplicationController ways = ways.where(:current_way_tags => { :k => type }) if type ways = ways.where(:current_way_tags => { :v => value }) if value ways = ways.limit(100) + else + ways = Array.new end # Matching for relation tags table @@ -64,6 +68,8 @@ class SearchController < ApplicationController relations = relations.where(:current_relation_tags => { :k => type }) if type relations = relations.where(:current_relation_tags => { :v => value }) if value relations = relations.limit(2000) + else + relations = Array.new end # Fetch any node needed for our ways (only have matching nodes so far) -- 2.43.2