Commit 2220fe167d588fa1ca900dcef497a875c22b989c

Authored by Daniela Feitosa
1 parent 6409d6cc

Fixing method with new solr search

(ActionItem1958)
app/controllers/my_profile/cms_controller.rb
... ... @@ -291,7 +291,7 @@ class CmsController < MyProfileController
291 291  
292 292 def search
293 293 query = params[:q]
294   - results = query.blank? ? [] : profile.articles.published.find_by_contents(query)
  294 + results = query.blank? ? [] : profile.articles.published.find_by_contents(query)[:results]
295 295 render :text => article_list_to_json(results), :content_type => 'application/json'
296 296 end
297 297 def media_upload
... ...
test/functional/cms_controller_test.rb
... ... @@ -9,6 +9,7 @@ class CmsControllerTest < Test::Unit::TestCase
9 9 fixtures :environments
10 10  
11 11 def setup
  12 + Test::Unit::TestCase::setup
12 13 @controller = CmsController.new
13 14 @request = ActionController::TestRequest.new
14 15 @request.stubs(:ssl?).returns(true)
... ...