dry-rb / dry-transaction

Business transaction DSL
http://dry-rb.org/gems/dry-transaction
MIT License
468 stars 55 forks source link

Documentation typo? #110

Closed FunkyloverOne closed 5 years ago

FunkyloverOne commented 6 years ago

Hey guys, on this page you have the following piece of code:

module UserCreationListener
  extend self

  def on_step(event)
    NOTIFICATIONS << "Started creation of #{user[:email]}"
  end

  def on_step_succeeded(event)
    user = event[:value]
    NOTIFICATIONS << "#{user[:email]} created"
  end

  def on_step_failure(event)
    user = event[:value]
    NOTIFICATIONS << "#{user[:email]} creation failed"
  end
end

I suppose that on line 5 here you meant to use event[:args][:email] instead of user[:email] as there is no user available :)

FunkyloverOne commented 5 years ago

So I see it's fixed now, closing it.