Module: MongoMapperExt::Update
- Defined in:
- lib/mongomapper_ext/update.rb
Instance Method Summary collapse
Instance Method Details
#safe_update(white_list, values) ⇒ Object
3 4 5 6 7 |
# File 'lib/mongomapper_ext/update.rb', line 3 def safe_update(white_list, values) white_list.each do |key| send("#{key}=", values[key]) if values.has_key?(key) end end |