From 4d3d971452086f375eed953f66f25cfe6e622281 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 1 Dec 2009 23:02:09 +0100 Subject: reduced instanciated AR objects for search --- app/controllers/search_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 97ecdfd..ea545b7 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -3,8 +3,7 @@ class SearchController < ApplicationController @page = Page.new search_term = params[:search_term] if search_term and not search_term.empty? - nodes = Node.search(params[:search_term]) - @results = nodes.map {|node| node.head} + @results = Node.search(params[:search_term], :include => :head) end end -- cgit v1.3