mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 00:36:01 +01:00
Don't check that params[:settings] is a Hash.
git-svn-id: http://svn.redmine.org/redmine/trunk@15729 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,9 +32,10 @@ class SettingsController < ApplicationController
|
|||||||
|
|
||||||
def edit
|
def edit
|
||||||
@notifiables = Redmine::Notifiable.all
|
@notifiables = Redmine::Notifiable.all
|
||||||
if request.post? && params[:settings] && params[:settings].is_a?(Hash)
|
if request.post?
|
||||||
Setting.set_all_from_params(params[:settings])
|
if Setting.set_all_from_params(params[:settings])
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
|
end
|
||||||
redirect_to settings_path(:tab => params[:tab])
|
redirect_to settings_path(:tab => params[:tab])
|
||||||
else
|
else
|
||||||
@options = {}
|
@options = {}
|
||||||
@@ -60,7 +61,7 @@ class SettingsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
if request.post?
|
if request.post?
|
||||||
Setting.send "plugin_#{@plugin.id}=", params[:settings]
|
Setting.send "plugin_#{@plugin.id}=", params[:settings].permit!.to_h
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to plugin_settings_path(@plugin)
|
redirect_to plugin_settings_path(@plugin)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user