Skip to content

Commit

Permalink
Fix formatting of README
Browse files Browse the repository at this point in the history
  • Loading branch information
bowsersenior committed Oct 11, 2010
1 parent ae56be4 commit e569169
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,44 @@
workflow_on_mongoid lets you use the {Workflow}[http://github.com/geekq/workflow] gem with your {Mongoid}[http://mongoid.org/] documents to add state machine functionality.

== How to use it
In your Gemfile, instead of
gem 'workflow'

In your Gemfile, instead of
gem 'workflow'

do
gem 'workflow_on_mongoid'
do
gem 'workflow_on_mongoid'

That is all. Now you can use {Workflow}[http://github.com/geekq/workflow] with your {Mongoid}[http://mongoid.org/] documents. Of course, you can still continue to use {Workflow}[http://github.com/geekq/workflow] with ActiveRecord, Remodel and plain objects. All that workflow_on_mongoid does is to add {Mongoid}[http://mongoid.org/] support. You can use all the features of {Workflow}[http://github.com/geekq/workflow] with {Mongoid}[http://mongoid.org/] models, including reflection of events & states, transition hooks, support for inherited models, etc. Just refer to the {Workflow docs}[http://github.com/geekq/workflow].
That is all. Now you can use {Workflow}[http://github.com/geekq/workflow] with your {Mongoid}[http://mongoid.org/] documents. Of course, you can still continue to use {Workflow}[http://github.com/geekq/workflow] with ActiveRecord, Remodel and plain objects. All that workflow_on_mongoid does is to add {Mongoid}[http://mongoid.org/] support. You can use all the features of {Workflow}[http://github.com/geekq/workflow] with {Mongoid}[http://mongoid.org/] models, including reflection of events & states, transition hooks, support for inherited models, etc. Just refer to the {Workflow docs}[http://github.com/geekq/workflow].


== Versioning
The version numbers of workflow_on_mongoid match the latest supported version of {Workflow}[http://github.com/geekq/workflow] . The current version is 0.7.0 .

The version numbers of workflow_on_mongoid match the latest supported version of {Workflow}[http://github.com/geekq/workflow] . The current version is 0.7.0 .

== Example
class MongoidImage
include Mongoid::Document
class MongoidImage
include Mongoid::Document

field :title
field :status
field :title
field :status

include Workflow
include Workflow

workflow_column :status
workflow_column :status

workflow do
state :unconverted do
event :convert, :transitions_to => :converted
end
state :converted
workflow do
state :unconverted do
event :convert, :transitions_to => :converted
end
end
state :converted
end
end

See the {tests for Mongoid}[http://github.com/bowsersenior/workflow_on_mongoid/blob/master/test/mongoid_test.rb] for more examples.
See the {tests for Mongoid}[http://github.com/bowsersenior/workflow_on_mongoid/blob/master/test/mongoid_test.rb] for more examples.

== Tests
I've included all the tests from the original workflow gem and added comprehensive tests for {Mongoid}[http://mongoid.org/] support. {Mongoid}[http://mongoid.org/] is now as well-tested as ActiveRecord. Including the existing tests ensures that workflow_on_mongoid implements support for {Mongoid}[http://mongoid.org/] documents without breaking anything.

I've included all the tests from the original workflow gem and added comprehensive tests for {Mongoid}[http://mongoid.org/] support. {Mongoid}[http://mongoid.org/] is now as well-tested as ActiveRecord. Including the existing tests ensures that workflow_on_mongoid implements support for {Mongoid}[http://mongoid.org/] documents without breaking anything.

= Project Info

Expand Down

0 comments on commit e569169

Please sign in to comment.