mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Update README.md
Swap :if / :unless examples to make more sense.
This commit is contained in:
parent
c704c99381
commit
33a6e0c53c
1 changed files with 2 additions and 2 deletions
|
@ -270,11 +270,11 @@ If you prefer a more Ruby-like guard syntax, you can use `if` and `unless` as we
|
|||
|
||||
```ruby
|
||||
event :clean do
|
||||
transitions :from => :running, :to => :cleaning, :unless => :cleaning_needed?
|
||||
transitions :from => :running, :to => :cleaning, :if => :cleaning_needed?
|
||||
end
|
||||
|
||||
event :sleep do
|
||||
transitions :from => :running, :to => :sleeping, :if => :cleaning_needed?
|
||||
transitions :from => :running, :to => :sleeping, :unless => :cleaning_needed?
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue