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

Merge pull request #36 from ramn/master

Documentation for callbacks around events
This commit is contained in:
Thorsten Böttger 2011-09-05 04:48:30 -07:00
commit 44c44538e7

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 do
transitions :to => :married, :from => [:dating]
end
end
```
# Other Stuff #
Author:: Scott Barron <scott at elitists dot net>