projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
6429: Put whitelist_update in module.
[arvados.git]
/
services
/
api
/
lib
/
whitelist_update.rb
1
module WhitelistUpdate
2
def check_update_whitelist permitted_fields
3
attribute_names.each do |field|
4
if not permitted_fields.include? field.to_sym and self.send((field.to_s + "_changed?").to_sym)
5
errors.add field, "Illegal update of field #{field}"
6
end
7
end
8
end
9
end