Method: Mushy::Collection#update
- Defined in:
- lib/mushy/fluxs/collection.rb
#update(event, config) ⇒ Object
58 59 60 61 62 63 |
# File 'lib/mushy/fluxs/collection.rb', line 58 def update event, config item = the_collection(config)[get_the_id(event, config)] event.each { |k, v| item[k] = v } if item event[config[:operation_performed]] = (item ? 'updated' : 'not exist') if config[:operation_performed] event end |