Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 00:06:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 00:06:30 +0300
commit274ea604fcd43ecccfba04756a9475a3efa47de0 (patch)
tree33b203dedc5e5b980f945bdf01b9f16fe698417d /app/controllers
parent930ff68c1efc380cb7522aa9b3884842eecb2486 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/application_settings_controller.rb11
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