Module: AASM

Defined in:
lib/opal/aasm.rb

Overview

Work around a couple of incompatibilities with Opal and AASM

Defined Under Namespace

Modules: Persistence Classes: Base

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

redefine because of opal breaks when doing a super in this case



93
94
95
96
97
98
# File 'lib/opal/aasm.rb', line 93

def self.included(base)
  base.extend AASM::ClassMethods
  AASM::StateMachine[base] ||= AASM::StateMachine.new
  AASM::Persistence.load_persistence(base)  
  super rescue nil #<--------------------------------added because of bug in opal
end