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

Add from_states_for_event and to_states_for_event methods #792

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steamwings
Copy link

@steamwings steamwings commented Aug 24, 2022

Hi, I'm new to AASM and just recently started using it.

What does this do?

  • Add from_states_for_event method to AASM::Base
  • Add to_states_for_event method to AASM::Base
  • Add respective unit tests

Use case

In my case, I want to create a message indicating which states an object must be in to progress to another state. I ended up writing the code for from_states_for_event and figured it would be nice to have it as an integrated helper.

to_states_for_event is included as a bonus.

Specs passing?

Yes. I ran them all with docker-compose as suggested--except for the rails 4.2 ones due to bundler issues. Also, I had to make a couple small changes to Dockerfile and docker-compose.yml to get them to run on the arm64v8 architecture. Those changes are not included with the PR.

@codeclimate
Copy link

codeclimate bot commented Aug 24, 2022

Code Climate has analyzed commit db0a30c and detected 0 issues on this pull request.

View more on Code Climate.

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

Successfully merging this pull request may close these issues.

None yet

1 participant