Skip to content

Commit

Permalink
Merge pull request #97 from Intrepidd/master
Browse files Browse the repository at this point in the history
Add README changes for pull request #90
  • Loading branch information
alto committed Nov 20, 2013
2 parents 1c6a636 + a934284 commit 569b017
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -69,6 +69,15 @@ job.may_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

You can define a number of callbacks for your transitions. These methods will be
Expand Down

0 comments on commit 569b017

Please sign in to comment.