Skip to content

Commit

Permalink
Merge pull request #89 from jxa/patch-1
Browse files Browse the repository at this point in the history
Include basic information about Mongoid usage
  • Loading branch information
alto committed Aug 29, 2013
2 parents d9c0eba + 2d475dc commit a2711e8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -239,6 +239,21 @@ class Job < ActiveRecord::Base
end
```

### Mongoid

AASM also supports persistence to Mongodb if you're using Mongoid. Make sure
to include Mongoid::Document before you include AASM.

```ruby
class Job
include Mongoid::Document
include AASM
aasm do
...
end
end
```

### Automatic Scopes

AASM will automatically create scope methods for each state in the model.
Expand Down Expand Up @@ -290,6 +305,7 @@ end

Since version *3.0.13* AASM supports ActiveRecord transactions. So whenever a transition
callback or the state update fails, all changes to any database record are rolled back.
Mongodb does not support transactions.

### Column name & migration

Expand Down

0 comments on commit a2711e8

Please sign in to comment.