Created
November 9, 2017 05:56
-
-
Save madzhuga/8c917fcb46eb7755a04e5f6c5def0ec9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User < ApplicationRecord | |
| ... | |
| after_create :start_newcomer_process | |
| def start_newcomer_process | |
| template = RailsWorkflow::ProcessTemplate.find_by_title('New User Process') | |
| # we using current_operation_path to navigate to a new endpoint | |
| # when user picks up operation | |
| RailsWorkflow::ProcessManager.start_process( | |
| template.id, | |
| { user: self, url_path: 'current_operation_path', url_params: self } | |
| ) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment