Commit 025330d8fa86e08ddc6c70a48874df00524fea2f

Authored by Braulio Bhavamitra
1 parent c4cde510

Revert "Revert "Fixing method with new solr search""

This reverts commit 4a1e090a5e3d20bb88fe587183699a00fe27d356.
app/controllers/my_profile/cms_controller.rb
... ... @@ -294,7 +294,7 @@ class CmsController < MyProfileController
294 294  
295 295 def search
296 296 query = params[:q]
297   - results = query.blank? ? [] : profile.articles.published.find_by_contents(query)
  297 + results = query.blank? ? [] : profile.articles.published.find_by_contents(query)[:results]
298 298 render :text => article_list_to_json(results), :content_type => 'application/json'
299 299 end
300 300 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)
... ...