wvanbergen/state_machine-audit_trail — pull request #9 by divineforest (2012-08-08 16:09:16+00:00)
Title: Allow descendant class in STI to have its own state machine while using ...

...only one transition class for parent model

For example:

class Parent; end
class ParentStateTransition < ActiveRecord::Base
belongs_to :parent
end

class ChildA
state_machine :state, :initial => :new do
store_audit_trail

event :complete do
transition [:new] => :completed
end
end
end

class ChildB
state_machine :state, :initial => :waiting do
store_audit_trail

event :start do
transition [:waiting] => :finished
end
end
end