Sha256: 0268ca8f549a11a5eb4a8478c0ef83d75472b1ee25e7b7979b207a93b69c1a70

Contents?: true

Size: 432 Bytes

Versions: 25

Compression:

Stored size: 432 Bytes

Contents

# An invalid example.
class InvalidTransitions1
  include DataMapper::Resource

  property :id, Serial

  is :state_machine do
    state :happy
    state :sad

    event :toggle

    # The next lines are intentionally incorrect.
    #
    # 'transition' is only valid when nested beneath 'event'
    transition :to => :happy, :from => :sad
    transition :to => :sad,   :from => :happy
  end

end

InvalidTransitions1.auto_migrate!

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
ardm-is-state_machine-1.2.0 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.2.0 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.2.0.rc2 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.2.0.rc1 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.1.0 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.1.0.rc3 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.1.0.rc2 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.1.0.rc1 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.2 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.1 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.0 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.0.rc3 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.0.rc2 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-1.0.0.rc1 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.10.2 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.10.1 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.10.0 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.9.5 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.9.4 spec/examples/invalid_transitions_1.rb
dm-is-state_machine-0.9.11 spec/examples/invalid_transitions_1.rb