diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-06 15:44:15 +0200 |
---|---|---|
committer | Martin Wortschack <mwortschack@gitlab.com> | 2018-09-06 15:44:15 +0200 |
commit | 276e78e05885fe39e8ad72a41a01587f1e28cfd5 (patch) | |
tree | 7d8a28a46719c7451991a424bbe083ff409ed064 /app/controllers/admin | |
parent | 3b8994d1ee9642555e18a8a05c530aec50df087f (diff) | |
download | gitlab-ce-276e78e05885fe39e8ad72a41a01587f1e28cfd5.tar.gz |
handle redirect properly
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 7d7221c2726..f9451decc19 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -9,8 +9,10 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController .new(@application_setting, current_user, application_setting_params) .execute + redirect_path = params[:redirect_path] ? params[:redirect_path].to_h : admin_application_settings_path + if successful - redirect_to request.referer, + redirect_to redirect_path, notice: 'Application settings saved successfully' else render :show |