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|
|
[: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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue