1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Update Readme, add state change logging example

This commit is contained in:
Anil Kumar Maurya 2019-09-03 22:25:06 +05:30 committed by GitHub
parent 4cf948f0e0
commit 95dcdb5bf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,7 @@
- [Transaction support](#transaction-support)
- [Pessimistic Locking](#pessimistic-locking)
- [Column name & migration](#column-name--migration)
- [Log State Changes](#log-state-changes)
- [Inspection](#inspection)
- [Warning output](#warning-output)
- [RubyMotion support](#rubymotion-support)
@ -1089,6 +1090,13 @@ class AddJobState < ActiveRecord::Migration
end
```
### Log State Changes
Logging state change can be done using [paper_trail](https://github.com/paper-trail-gem/paper_trail) gem
Example of implementation can be found here [https://github.com/nitsujri/aasm-papertrail-example](https://github.com/nitsujri/aasm-papertrail-example)
### Inspection
AASM supports query methods for states and events