mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Add a section for Sequel support.
This commit is contained in:
parent
c1461fbf6c
commit
9c5b2369d0
1 changed files with 17 additions and 0 deletions
17
README.md
17
README.md
|
@ -278,6 +278,23 @@ class Job < ActiveRecord::Base
|
|||
end
|
||||
```
|
||||
|
||||
### Sequel
|
||||
|
||||
AASM also supports Sequel besides ActiveRecord.
|
||||
|
||||
```ruby
|
||||
class Job < Sequel::Model
|
||||
include AASM
|
||||
|
||||
aasm do # default column: aasm_state
|
||||
...
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
However it's not yet feature completed as ActiveRecord. For example,
|
||||
no scope would be defined as in ActiveRecord. See _Automatic Scopes_.
|
||||
|
||||
### Mongoid
|
||||
|
||||
AASM also supports persistence to Mongodb if you're using Mongoid. Make sure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue