aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/README
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-18 17:20:25 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-01-18 17:20:25 +1100
commit71328a9856734dda82620f42e5161c7a74696145 (patch)
tree27d37abc9b854e902acd1e815cdc7ebbef22ace1 /activemodel/README
parent6e45bf53fb594cccb25ff38bdae235710c869419 (diff)
downloadrails-71328a9856734dda82620f42e5161c7a74696145.tar.gz
rails-71328a9856734dda82620f42e5161c7a74696145.tar.bz2
rails-71328a9856734dda82620f42e5161c7a74696145.zip
Fixing up state machine docs
Diffstat (limited to 'activemodel/README')
-rw-r--r--activemodel/README13
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]
+