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

Calling super from AASM.included

Reason for this is rails gets uppity if you include AASM in a model, then subclass that model (STI.) You can end up with "can't dup NilClass" errors and it's all very confusing.

Calling super is considered playing nicely with other code anyway.
This commit is contained in:
Caius Durling 2010-06-29 23:58:54 +08:00 committed by Travis Tilley
parent ef61951718
commit 20de42db78

View file

@ -11,6 +11,7 @@ module AASM
unless AASM::StateMachine[base]
AASM::StateMachine[base] = AASM::StateMachine.new('')
end
super
end
module ClassMethods