pluginaweek/state_machine

after_transition's and before_transition's `do` only executes a single method or first array entry

Closed this issue · 1 comments

If you want to call multiple methods before or after a transaction and specify an array as a key for the do: entry, for example...

after_transition on: :event, do: [:foo, :bar]
before_transition on: :event, do: [:foo, :bar]

...foo will be executed, but bar will not. This does not seem to be th case with an array passed to the on: entry, for example...

after_transition on: [:event1, :event2], do: :foo
before_transition on: [:event1, :event2], do: :foo

...foo will be called in both cases.

Wrong repo, sorry!