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|
params.delete(key)
}
if !params[:preferences].empty?
[:online_service_disable, :permission, :render].each { |key|
params[:preferences].delete(key)
}
params[:preferences].merge!(setting.preferences)
end
params
end