mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Merge pull request #97 from Intrepidd/master
Add README changes for pull request #90
This commit is contained in:
commit
569b017d9f
1 changed files with 9 additions and 0 deletions
|
@ -69,6 +69,15 @@ job.may_run? # => false
|
||||||
job.run # => false
|
job.run # => false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When firing an event, you can pass a block to the method, it will be called only if
|
||||||
|
the transition succeeds :
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
job.run do
|
||||||
|
job.user.notify_job_ran # Will be called if job.may_run? is true
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
### Callbacks
|
### Callbacks
|
||||||
|
|
||||||
You can define a number of callbacks for your transitions. These methods will be
|
You can define a number of callbacks for your transitions. These methods will be
|
||||||
|
|
Loading…
Reference in a new issue