From 9873846031b4d15476c4ac998fdd064d3844991d Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 20 Jul 2012 17:05:16 -0300 Subject: [PATCH] Allow blank search --- app/controllers/my_profile/cms_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 32eddd2..29c001d 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -265,7 +265,7 @@ class CmsController < MyProfileController def search query = params[:q] - results = query.blank? ? [] : profile.files.published.find_by_contents(query)[:results] + results = profile.files.published.find_by_contents(query)[:results] render :text => article_list_to_json(results), :content_type => 'application/json' end -- libgit2 0.21.2