Improved keep_certain_attributes check.

This commit is contained in:
Martin Edenhofer 2016-08-26 17:08:49 +02:00
parent 944d9034d1
commit ed99958d39

View file

@ -96,10 +96,12 @@ class SettingsController < ApplicationController
[:name, :area, :state_initial, :frontend, :options].each { |key| [:name, :area, :state_initial, :frontend, :options].each { |key|
params.delete(key) params.delete(key)
} }
[:online_service_disable, :permission, :render].each { |key| if !params[:preferences].empty?
params[:preferences].delete(key) [:online_service_disable, :permission, :render].each { |key|
} params[:preferences].delete(key)
params[:preferences].merge!(setting.preferences) }
params[:preferences].merge!(setting.preferences)
end
params params
end end