diff options
| author | hukl <contact@smyck.org> | 2009-12-01 23:02:09 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-12-01 23:03:47 +0100 |
| commit | 4d3d971452086f375eed953f66f25cfe6e622281 (patch) | |
| tree | 1a3d2c25dfe51823e7420768029450736a5369ae /app/controllers | |
| parent | 7e46b0ce0f2216d4a53cf9e633fcfed3cd421c7c (diff) | |
reduced instanciated AR objects for search
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/search_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 | |||
| 3 | @page = Page.new | 3 | @page = Page.new |
| 4 | search_term = params[:search_term] | 4 | search_term = params[:search_term] |
| 5 | if search_term and not search_term.empty? | 5 | if search_term and not search_term.empty? |
| 6 | nodes = Node.search(params[:search_term]) | 6 | @results = Node.search(params[:search_term], :include => :head) |
| 7 | @results = nodes.map {|node| node.head} | ||
| 8 | end | 7 | end |
| 9 | end | 8 | end |
| 10 | 9 | ||
