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-4.10.1 spec/models/state_machine_with_failed_event.rb
aasm-4.10.0 spec/models/state_machine_with_failed_event.rb
aasm-4.9.0 spec/models/state_machine_with_failed_event.rb
aasm-4.8.0 spec/models/state_machine_with_failed_event.rb
aasm-4.7.0 spec/models/state_machine_with_failed_event.rb