diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-09-23 06:18:23 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-09-23 06:18:23 +0300 |
commit | 2a423e0325b644bbb855b090c682c9b11c707616 (patch) | |
tree | 7c2dcdb02621d5c67252e3a96468217b5a58d30e /app | |
parent | 8078f8796a4e575f8cec806815251139ab524d39 (diff) | |
parent | 47b49624b1caff3db026c69ac219aa48507eedaa (diff) |
Merge branch 'search-filters-label-fix' into 'master'
Fixed search dropdown labels not displaying
## What does this MR do?
Returns the search controller method after finding the project & group.
## Why was this MR needed?
The search controller was returning early when the search term was empty causing a bug where the dropdown toggles wouldn't show the correct text - instead defaulting to `Any`.
## Screenshots (if relevant)
![Screen_Shot_2016-09-09_at_12.09.57](/uploads/8c6bb36f4e163312314611d2877d5fa4/Screen_Shot_2016-09-09_at_12.09.57.png)
## What are the relevant issue numbers?
Closes #21783
See merge request !6277
Diffstat (limited to 'app')
-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] |