diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-18 17:20:25 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-18 17:20:25 +1100 |
commit | 71328a9856734dda82620f42e5161c7a74696145 (patch) | |
tree | 27d37abc9b854e902acd1e815cdc7ebbef22ace1 /activemodel/README | |
parent | 6e45bf53fb594cccb25ff38bdae235710c869419 (diff) | |
download | rails-71328a9856734dda82620f42e5161c7a74696145.tar.gz rails-71328a9856734dda82620f42e5161c7a74696145.tar.bz2 rails-71328a9856734dda82620f42e5161c7a74696145.zip |
Fixing up state machine docs
Diffstat (limited to 'activemodel/README')
-rw-r--r-- | activemodel/README | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activemodel/README b/activemodel/README index 95d1c63f75..7d18571227 100644 --- a/activemodel/README +++ b/activemodel/README @@ -154,3 +154,16 @@ functionality from the following modules: {Learn more}[link:classes/ActiveModel/Serialization.html] + +* Turning your object into a finite State Machine + + ActiveModel::StateMachine provides a clean way to include all the methods + you need to transform your object into a finite State Machine... + + light = TrafficLight.new + light.current_state #=> :red + light.change_color! #=> true + light.current_state #=> :green + + {Learn more}[link:classes/ActiveModel/StateMachine.html] + |