From c848ddbc3193a35e60bf83667114b98a67da3484 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 15 Jan 2016 20:08:51 +0100 Subject: [PATCH] Improved clode layout. --- app/controllers/search_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 25946bf47..d8e665c7f 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -58,10 +58,10 @@ class SearchController < ApplicationController # do only one query to index search backend if !objects_with_direct_search_index.empty? - items = SearchIndexBackend.search( query, limit, objects_with_direct_search_index ) + items = SearchIndexBackend.search(query, limit, objects_with_direct_search_index) items.each { |item| require item[:type].to_filename - record = Kernel.const_get( item[:type] ).find( item[:id] ) + record = Kernel.const_get(item[:type]).lookup(id: item[:id]) assets = record.assets(assets) result.push item }