Skip to content

Instantly share code, notes, and snippets.

@harukizaemon
Created October 13, 2010 23:20
Show Gist options
  • Select an option

  • Save harukizaemon/625171 to your computer and use it in GitHub Desktop.

Select an option

Save harukizaemon/625171 to your computer and use it in GitHub Desktop.
@database[:events]
.where(:aggregate_id => aggregate_id){ version > since_version }
.order(:version).map do |record|
Event.new(
record[:version],
record[:type].to_sym,
JSON.parse(record[:data], :symbolize_names => true)
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment