diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-30 18:38:01 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-30 18:38:01 -0600 |
commit | db49c706b62e7ea2ab93f05399dbfddf5087ee0c (patch) | |
tree | 7f369bd2b77d620e344f19ba8156c597e2493f58 /activerecord/test/models/traffic_light.rb | |
parent | 657d85580e914caf368a8a12ff5642e4d979ab7e (diff) | |
download | rails-db49c706b62e7ea2ab93f05399dbfddf5087ee0c.tar.gz rails-db49c706b62e7ea2ab93f05399dbfddf5087ee0c.tar.bz2 rails-db49c706b62e7ea2ab93f05399dbfddf5087ee0c.zip |
Axe AM state machine
We're going do it eventually, get it done before 3.0 is final.
Diffstat (limited to 'activerecord/test/models/traffic_light.rb')
-rw-r--r-- | activerecord/test/models/traffic_light.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/activerecord/test/models/traffic_light.rb b/activerecord/test/models/traffic_light.rb deleted file mode 100644 index f8cfddbef9..0000000000 --- a/activerecord/test/models/traffic_light.rb +++ /dev/null @@ -1,27 +0,0 @@ -class TrafficLight < ActiveRecord::Base - include ActiveRecord::StateMachine - - state_machine do - state :off - - state :red - state :green - state :yellow - - event :red_on do - transitions :to => :red, :from => [:yellow] - end - - event :green_on do - transitions :to => :green, :from => [:red] - end - - event :yellow_on do - transitions :to => :yellow, :from => [:green] - end - - event :reset do - transitions :to => :red, :from => [:off] - end - end -end |