Commit 276e78e0 authored by Martin Wortschack's avatar Martin Wortschack

handle redirect properly

parent 3b8994d1
...@@ -9,8 +9,10 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -9,8 +9,10 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
.new(@application_setting, current_user, application_setting_params) .new(@application_setting, current_user, application_setting_params)
.execute .execute
redirect_path = params[:redirect_path] ? params[:redirect_path].to_h : admin_application_settings_path
if successful if successful
redirect_to request.referer, redirect_to redirect_path,
notice: 'Application settings saved successfully' notice: 'Application settings saved successfully'
else else
render :show render :show
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment