lib/aasm/aasm.rb in aasm-3.0.19 vs lib/aasm/aasm.rb in aasm-3.0.20
- old
+ new
@@ -1,9 +1,13 @@
module AASM
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::StateMachine[base] ||= AASM::StateMachine.new('')
+
AASM::Persistence.load_persistence(base)
super
end
module ClassMethods