Closed ezuhaib closed 2 years ago
I expect the following to return an Workflow::Event object
Workflow::Event
@article.current_state.events[:publish] @article.current_state.events.first
Whereas both of these return arrays for me, making me have to use:
@article.current_state.events[:publish][0] @article.current_state.events.first[1][0]
current_state returns an array of events because there can be multiple events named publish. See https://github.com/geekq/workflow/pull/109 for the change that introduced this.
current_state
publish
I like this idea, would be useful.
I expect the following to return an
Workflow::Event
objectWhereas both of these return arrays for me, making me have to use: