From 025330d8fa86e08ddc6c70a48874df00524fea2f Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Thu, 22 Dec 2011 00:34:29 +0000 Subject: [PATCH] Revert "Revert "Fixing method with new solr search"" --- app/controllers/my_profile/cms_controller.rb | 2 +- test/functional/cms_controller_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 84630e9..94b7bdd 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -294,7 +294,7 @@ class CmsController < MyProfileController def search query = params[:q] - results = query.blank? ? [] : profile.articles.published.find_by_contents(query) + results = query.blank? ? [] : profile.articles.published.find_by_contents(query)[:results] render :text => article_list_to_json(results), :content_type => 'application/json' end def media_upload diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 186b156..01fd1e1 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -9,6 +9,7 @@ class CmsControllerTest < Test::Unit::TestCase fixtures :environments def setup + Test::Unit::TestCase::setup @controller = CmsController.new @request = ActionController::TestRequest.new @request.stubs(:ssl?).returns(true) -- libgit2 0.21.2