class RubyEventStore::ROM::Memory::Changesets::UpdateEvents
Public Instance Methods
commit()
click to toggle source
# File lib/ruby_event_store/rom/adapters/memory/changesets/update_events.rb, line 8 def commit to_a.each do |params| attributes = command.input[params].to_h.delete_if { |k, v| k == :created_at && v.nil? } relation.by_pk(params.fetch(:id)).dataset.map { |tuple| tuple.update(attributes) } end end