module AASM
def self.included(base) #:nodoc:
initialize persistence for the state machine
make sure to load class methods as well
provide a state machine for the including class
def self.included(base) #:nodoc: base.extend AASM::ClassMethods # do not overwrite existing state machines, which could have been created by # inheritance, see class method inherited AASM::StateMachineStore.register(base) AASM::Persistence.load_persistence(base) super end