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:
parent
ef61951718
commit
20de42db78
1 changed files with 1 additions and 0 deletions
|
@ -11,6 +11,7 @@ module AASM
|
|||
unless AASM::StateMachine[base]
|
||||
AASM::StateMachine[base] = AASM::StateMachine.new('')
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
|
|
Loading…
Reference in a new issue