Update attribute whitelist

pull/761/head
Rick Carlino 2018-03-30 16:39:16 -05:00
parent f2834dbb66
commit 3742ba9c32
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ module Configs
def sliced_attrs
whitelist = target_klass.class.column_names.map(&:to_sym)
updates = update_attrs.deep_symbolize_keys.except(:device_id)
updates = update_attrs
.deep_symbolize_keys
.except(:device_id, :id, :created_at)
updates.slice(*whitelist)
end
end