mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Update readme for required to_state argument.
This commit is contained in:
parent
df5841f39d
commit
49ed0fb3ec
1 changed files with 2 additions and 0 deletions
|
@ -149,6 +149,8 @@ Also, you can pass parameters to events:
|
|||
|
||||
In this case the `set_process` would be called with `:defragmentation` argument.
|
||||
|
||||
Note that when passing arguments to a state transition, the first argument must be the desired end state. In the above example, we wish to transition to `:running` state and run the callback with `:defragmentation` argument. You can also pass in `nil` as the desired end state, and AASM will try to transition to the first end state defined for that event.
|
||||
|
||||
In case of an error during the event processing the error is rescued and passed to `:error`
|
||||
callback, which can handle it or re-raise it for further propagation.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue