We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
We'd like to use workflow to create a wizard. Is there any way to get the current step and the total number of steps in the workflow?
Thanks
The text was updated successfully, but these errors were encountered:
You can access your workflow specification as described in the documentation http://www.geekq.net/workflow/#accessing_your_workflow_specification
Workflow states appear in the array in the order they were defined
Article.workflow_spec.states.keys #=> [:rejected, :awaiting_review, :being_reviewed, :accepted, :new] Article.workflow_spec.states.length #=> 5
Use Array#index to find out the index of the current state in the complete list of all possible states. Something like
Article.workflow_spec.states.keys.index(article.current_state.name)
Sorry, something went wrong.
No branches or pull requests
Hi,
We'd like to use workflow to create a wizard. Is there any way to get the current step and the total number of steps in the workflow?
Thanks
The text was updated successfully, but these errors were encountered: