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

Update Readme, do not set default value at database level

Fixes #381
This commit is contained in:
Anil Kumar Maurya 2020-06-16 16:15:44 +05:30 committed by GitHub
parent 594bccf133
commit 6626710c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1084,7 +1084,10 @@ end
```
Whatever column name is used, make sure to add a migration to provide this column
(of type `string`):
(of type `string`).
Do not add default value for column at the database level. If you add default
value in database then AASM callbacks on the initial state will not be fired upon
instantiation of the model.
```ruby
class AddJobState < ActiveRecord::Migration