Sha256: d41dca390341ed8133668a844c9e66b8bcd49a4da54d9d5bcb0d6a33c8c6601e

Contents?: true

Size: 344 Bytes

Versions: 25

Compression:

Stored size: 344 Bytes

Contents

class StateMachineWithFailedEvent
  include AASM

  aasm do
    state :init, :initial => true
    state :failed
    state :sent

    event :failed do
      transitions :from => :init, :to => :failed
    end
    event :send, :before => :callback do
      transitions :from => :init, :to => :sent
    end
  end

  def callback
    true
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
aasm-5.3.1 spec/models/state_machine_with_failed_event.rb
aasm-5.3.0 spec/models/state_machine_with_failed_event.rb
aasm-5.2.0 spec/models/state_machine_with_failed_event.rb
aasm-5.1.1 spec/models/state_machine_with_failed_event.rb
aasm-5.1.0 spec/models/state_machine_with_failed_event.rb
aasm-5.0.8 spec/models/state_machine_with_failed_event.rb
aasm-5.0.7 spec/models/state_machine_with_failed_event.rb
aasm-5.0.6 spec/models/state_machine_with_failed_event.rb
aasm-5.0.5 spec/models/state_machine_with_failed_event.rb
aasm-5.0.4 spec/models/state_machine_with_failed_event.rb
aasm-5.0.3 spec/models/state_machine_with_failed_event.rb
aasm-5.0.2 spec/models/state_machine_with_failed_event.rb
aasm-5.0.1 spec/models/state_machine_with_failed_event.rb
aasm-5.0.0 spec/models/state_machine_with_failed_event.rb
aasm-4.12.3 spec/models/state_machine_with_failed_event.rb
aasm-4.12.2 spec/models/state_machine_with_failed_event.rb
aasm-4.12.1 spec/models/state_machine_with_failed_event.rb
aasm-4.12.0 spec/models/state_machine_with_failed_event.rb
aasm-4.11.1 spec/models/state_machine_with_failed_event.rb
aasm-4.11.0 spec/models/state_machine_with_failed_event.rb