README.rdoc in transitions-0.1.2 vs README.rdoc in transitions-0.1.3
- old
+ new
@@ -49,16 +49,25 @@
require 'transitions'
whereever you load your dependencies in your application.
-<b>Know limitations:</b>
+<b>Known limitations:</b>
* You can only use one state machine per model. While in theory you can define two or more, this won't work as you would expect. Not supporting this was intentional, if you're interested in the ratione look up version 1.0.0 in the CHANGELOG.
* Use symbols, not strings for declaring the state machine. Using strings is *not* supported as is using whitespace in names (because `transitions` possibly generates methods out of this).
=== Features
+
+==== Getting and setting the current state
+
+Use the (surprise ahead) `current_state` method - in case you didn't set a state explicitly you'll get back the state that you defined as initial state.
+
+ >> Product.new.current_state
+ => :available
+
+You can also set a new state explicitly via `update_current_state(new_state, persist = true / false)` but you should never do this unless you really know what you're doing and why - rather use events / state transitions (see below).
==== Events
When you declare an event, say <tt>discontinue</tt>, three methods are declared for
you: <tt>discontinue</tt>, <tt>discontinue!</tt> and <tt>can_discontinue?</tt>. The first two events will modify the <tt>state</tt> attribute on successful transition,