state_machines-activerecord icon indicating copy to clipboard operation
state_machines-activerecord copied to clipboard

Pick initial state from DB schema

Open mksm opened this issue 6 years ago • 0 comments

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

mksm avatar May 25 '18 19:05 mksm