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

Calling a transition "fail" causes errors with invalid transitions #35

Open
VOjha opened this issue May 31, 2016 · 0 comments
Open

Calling a transition "fail" causes errors with invalid transitions #35

VOjha opened this issue May 31, 2016 · 0 comments

Comments

@VOjha
Copy link
Contributor

VOjha commented May 31, 2016

If you have a transition named :fail and then try to call an invalid transition (the ! version), instead of getting an invalid transition error, you get an undefined method error for [] on EndState::InvalidTransition.

class TestMachine < EndState::StateMachine
  transition open: :failed, as: :fail
end

TestMachine.new(object).some_random_transition!
# undefined method '[]' for EndState::InvalidTransition:Class
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