diff options
author | Phil Hughes <me@iamphill.com> | 2016-09-09 12:08:49 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-09-12 09:00:57 +0100 |
commit | 47b49624b1caff3db026c69ac219aa48507eedaa (patch) | |
tree | 9c217cb5370dbfdd2da0890fb22b775315fb589d /app/controllers/search_controller.rb | |
parent | 3a59efd562d22ec3148101d794d99889ccc9b82b (diff) | |
download | gitlab-ce-47b49624b1caff3db026c69ac219aa48507eedaa.tar.gz |
Fixed search dropdown labels not displayingsearch-filters-label-fix
This would only happen when the search term was empty because the method was returning before the controller could find the group or project for the toggle
Closes #21783
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 61517d21f9f..d01e0dedf52 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -6,8 +6,6 @@ class SearchController < ApplicationController layout 'search' def show - return if params[:search].nil? || params[:search].blank? - if params[:project_id].present? @project = Project.find_by(id: params[:project_id]) @project = nil unless can?(current_user, :download_code, @project) @@ -18,6 +16,8 @@ class SearchController < ApplicationController @group = nil unless can?(current_user, :read_group, @group) end + return if params[:search].nil? || params[:search].blank? + @search_term = params[:search] @scope = params[:scope] |