document how to define transitions from any state

This commit is contained in:
Anton Chuchkalov 2020-08-12 16:49:59 +02:00 committed by Anil Kumar Maurya
parent d19fc6d3f3
commit 1cca1b24d6
1 changed files with 8 additions and 0 deletions

View File

@ -434,6 +434,14 @@ job.stage1_completed
job.aasm.current_state # stage3
```
You can define transition from any defined state by omitting `from`:
```ruby
event :abort do
transitions to: :aborted
end
```
### Display name for state
You can define display name for state using :display option