1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Documentation: callbacks around events

This commit is contained in:
ramn 2011-09-04 17:59:55 +02:00
parent 2585c77e52
commit fc99d90932

View file

@ -117,6 +117,23 @@ This example uses a few of the more complex features available.
end
```
## Callbacks around events
```ruby
class Relationship
include AASM
aasm_state :dating
aasm_state :married
aasm_event :get_married
:before => :make_vows,
:after => :eat_wedding_cake
transitions :to => :married, :from => [:dating]
end
end
```
# Other Stuff #
Author:: Scott Barron <scott at elitists dot net>