Improved keep_certain_attributes check.
This commit is contained in:
parent
944d9034d1
commit
ed99958d39
1 changed files with 6 additions and 4 deletions
|
@ -96,10 +96,12 @@ class SettingsController < ApplicationController
|
|||
[:name, :area, :state_initial, :frontend, :options].each { |key|
|
||||
params.delete(key)
|
||||
}
|
||||
[:online_service_disable, :permission, :render].each { |key|
|
||||
params[:preferences].delete(key)
|
||||
}
|
||||
params[:preferences].merge!(setting.preferences)
|
||||
if !params[:preferences].empty?
|
||||
[:online_service_disable, :permission, :render].each { |key|
|
||||
params[:preferences].delete(key)
|
||||
}
|
||||
params[:preferences].merge!(setting.preferences)
|
||||
end
|
||||
params
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue