diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 00:06:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 00:06:30 +0300 |
commit | 274ea604fcd43ecccfba04756a9475a3efa47de0 (patch) | |
tree | 33b203dedc5e5b980f945bdf01b9f16fe698417d /app/controllers | |
parent | 930ff68c1efc380cb7522aa9b3884842eecb2486 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index dc16ad80980..03e935fceae 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -6,15 +6,16 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController before_action :set_application_setting before_action :whitelist_query_limiting, only: [:usage_data] - VALID_SETTING_PANELS = %w(show integrations repository templates + VALID_SETTING_PANELS = %w(general integrations repository templates ci_cd reporting metrics_and_profiling network geo preferences).freeze - def show + VALID_SETTING_PANELS.each do |action| + define_method(action) { perform_update if submitted? } end - (VALID_SETTING_PANELS - %w(show)).each do |action| - define_method(action) { perform_update if submitted? } + def show + render :general end def update @@ -144,7 +145,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController end def render_update_error - action = VALID_SETTING_PANELS.include?(action_name) ? action_name : :show + action = VALID_SETTING_PANELS.include?(action_name) ? action_name : :general render action end |