README.rdoc in transitions-0.0.13 vs README.rdoc in transitions-0.0.14
- old
+ new
@@ -10,15 +10,15 @@
== Rails
This goes into your Gemfile:
- gem "transitions", :require => ["transitions", "active_record/transitions"]
+ gem "transitions", :require => ["transitions", "active_model/transitions"]
-… and this into your AR model:
+… and this into your ORM model:
- include ActiveRecord::Transitions
+ include ActiveModel::Transitions
== Standalone
gem install transitions
@@ -60,11 +60,11 @@
`transitions` will automatically generate scopes for you if you are using ActiveRecord and tell it to do so via the `auto_scopes` option:
Given a model like this:
class Order < ActiveRecord::Base
- include ActiveRecord::Transitions
+ include ActiveModel::Transitions
state_machine :auto_scopes => true do
state :pick_line_items
state :picking_line_items
end
end
@@ -115,10 +115,10 @@
transitions :from => :complete, :to => :exploded
end
# This will look for an attribute named repaired_on to update upon save
event :rebuild, :timestamp => :repaired_on do
- transiions :from => :exploded, :to => :rebuilt
+ transitions :from => :exploded, :to => :rebuilt
end
== Listing all the available states
You can easily get a listing of all available states: