lib/state_machine.rb in eric-aasm-2.0.3 vs lib/state_machine.rb in eric-aasm-2.0.4

- old
+ new

@@ -20,9 +20,15 @@ @states = [] @events = {} @config = OpenStruct.new end + def clone + klone = super + klone.states = states.clone + klone + end + def create_state(name, options) @states << AASM::SupportingClasses::State.new(name, options) unless @states.include?(name) end end end