AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, NoBrainer, Dynamoid)
Go to file
Scott Barron 61b6b8ec06 Add two event callbacks:
aasm_event_fired(from, to) - called when an event is fired successfully
aasm_event_failed(event)   - called when an event fails

These could be used to implement transition logging [Artem Vasiliev] or
setting a timestamp column [Mike Ferrier] as well as other pieces of love and magic.
2008-03-02 07:52:46 -05:00
doc Prepare rakefile and rake tasks for gem packaging and rdocing 2008-02-21 11:41:56 -05:00
lib Add two event callbacks: 2008-03-02 07:52:46 -05:00
spec Add two event callbacks: 2008-03-02 07:52:46 -05:00
CHANGELOG Add two event callbacks: 2008-03-02 07:52:46 -05:00
MIT-LICENSE Add .aasm_states method to get a list of all states for a class 2008-02-21 12:54:42 -05:00
README Throw a quick blurb in the readme 2008-02-22 18:23:19 -05:00
Rakefile Add .aasm_states method to get a list of all states for a class 2008-02-21 12:54:42 -05:00
TODO Add two event callbacks: 2008-03-02 07:52:46 -05:00
aasm.rb Import into git 2008-01-07 14:11:38 -05:00

README

This is AASM

AASM is an evolution of the Rails plugin acts_as_state_machine.

AASM Features

Everything you've come to know and love from acts_as_state_machine, and then some:

- Separation from Rails
  * Mix into any Ruby class
- Persistence hooks so state can be saved in whatever floats your boat
  * e.g. ActiveRecord, Marshal, etc.

See the TODO for more.


gem install aasm

scott@elitists.net