Skip to content
New issue

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

[Question] How should we prevent the after hook from running if we threw :abort in the before hook? #55

Open
andychongyz opened this issue Jul 1, 2022 · 0 comments

Comments

@andychongyz
Copy link

andychongyz commented Jul 1, 2022

Hi folks! Hope that it is okay to open up an issue for this question. The after hook ran even I throw :abort in the before hook, is this by design? Right now, I'm just using an if statement to check if I should continue to run the after hook. Is there a better way of doing this?

after do
  if status == "the status it should transitioned to"
    run the after transition code
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant