3

I'm using the workflow gem on some of my models in order to implement a state machine. is it possible to have multiple "workflows" on the same model?

Ran
  • 3,455
  • 12
  • 47
  • 60

1 Answers1

0

Using some ruby meta-programming (see Storing workflows (state machines) in the DB. What's the best way?) this should be easily accomplished. I'm working out a solution in this vein to use for myself, and hopefully for an eventual pull into the docs if I can get it worked out.

However, if you have a finite number of workflows with predefined steps, you could just follow the example from the readme at https://github.com/geekq/workflow/#individual-workflows-for-objects

Community
  • 1
  • 1
jimcavoli
  • 854
  • 9
  • 22