Sha256: 501e2a0ce023f3d806b4eb016b6f2fd0ecd45599651dbc0ea205aa8702706f8a

Contents?: true

Size: 422 Bytes

Versions: 25

Compression:

Stored size: 422 Bytes

Contents

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

  property :id, Serial

  is :state_machine do
    state :happy
    state :sad

    event :toggle
  end

  # 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

InvalidTransitions2.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_2.rb
dm-is-state_machine-1.2.0 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.2.0.rc2 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.2.0.rc1 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.1.0 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.1.0.rc3 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.1.0.rc2 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.1.0.rc1 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.2 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.1 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.0 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.0.rc3 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.0.rc2 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-1.0.0.rc1 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.10.2 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.10.1 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.10.0 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.9.4 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.9.6 spec/examples/invalid_transitions_2.rb
dm-is-state_machine-0.9.7 spec/examples/invalid_transitions_2.rb