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

document error callback behaviour

This commit is contained in:
Vladimir Meremyanin 2013-02-21 12:16:08 +04:00
parent 24a4778ad4
commit 22df5d1c8f

View file

@ -88,6 +88,9 @@ class Job
after do
...
end
error do |e|
...
end
transitions :from => :running, :to => :sleeping
end
end
@ -132,6 +135,8 @@ Also, you can pass parameters to events:
In this case the `set_process` would be called with `:defagmentation` argument.
In case an error occurred during event it is `rescue`d and passed to `:error` callback, which can handle it or re`raise`.
### Guards
Let's assume you want to allow particular transitions only if a defined condition is