lorefnon / workflow-orchestrator

Ruby DSL for modelling workflows as state machines
MIT License
11 stars 4 forks source link

Support un-persisted ActiveRecord objects #4

Open jasonkarns opened 5 years ago

jasonkarns commented 5 years ago

It would be useful if the ActiveRecord adapter support workflow transitions on newly-created (unpersisted) objects. I believe it would only require the persist_workflow_state method to check persisted? first, and to assign the attribute directly without attempting to update_column.

lorefnon commented 5 years ago

Hi @jasonkarns, It has been a while since I used this project (or ruby) so development hasn't been very active.

I'll check into this in next couple of days. But if you'd like to submit a PR for this I'll be happy to merge it.