diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-27 17:29:13 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-04-03 20:19:20 +0200 |
commit | d10416e231a27c63c322ba7338f2ea8279436336 (patch) | |
tree | 96283755995507d3149b0077bbe06ec812f855e0 /app | |
parent | a32941aee32ddfd7b114011f951741e06a53be5d (diff) | |
download | gitlab-ce-d10416e231a27c63c322ba7338f2ea8279436336.tar.gz |
Fixed dashboard filtering tests
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index d228956d8e3..68d328fa797 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -12,7 +12,7 @@ class DashboardController < Dashboard::ApplicationController before_action :event_filter, only: :activity before_action :projects, only: [:issues, :merge_requests] before_action :set_show_full_reference, only: [:issues, :merge_requests] - before_action :check_filters_presence, only: [:issues, :merge_requests] + before_action :check_filters_presence!, only: [:issues, :merge_requests] respond_to :html @@ -48,9 +48,14 @@ class DashboardController < Dashboard::ApplicationController @show_full_reference = true end - def check_filters_presence + def check_filters_presence! @no_filters_set = FILTER_PARAMS.none? { |k| params.key?(k) } - render action: action_name if @no_filters_set + return unless @no_filters_set + + respond_to do |format| + format.html + format.atom { head :bad_request } + end end end |