state_machines-activerecord
state_machines-activerecord copied to clipboard
Pick initial state from DB schema
In db/schema.rb
:
t.string "state", default: "active", null: false
I would expect that: Foo.new.state
to be active
. But without setting initial: :active
in the state machine definition, it sets the value to nil
.
edit: using v0.5.1