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 state method to transition history #493

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dylan-hoefsloot
Copy link
Contributor

This is a continuation of the work of marclerodrigues in No easy way to find previous state.

One of the concerns was:

I like the idea.

Is it possible to test if this gracefully falls back when a table does not have the from_state column?
It'd be great if we didn't make table migrations required.

This PR adds checks to see if the column exists before querying it, therefore users who have not added this column will be able to continue with existing behaviour. This means that this is not a breaking change.

Persisting this information means that accessing it is faster and easier and avoid problems such as mentioned in this comment and the issue containing it.

@dylan-hoefsloot dylan-hoefsloot force-pushed the feature/add_from_state_to_transition branch from d85e999 to a14b34c Compare January 11, 2024 20:54
@dylan-hoefsloot dylan-hoefsloot force-pushed the feature/add_from_state_to_transition branch from a14b34c to 8e9c04d Compare January 11, 2024 20:56
@dylan-hoefsloot
Copy link
Contributor Author

Hey @stephenbinns,

Any chance you could give this a look over

@dylan-hoefsloot
Copy link
Contributor Author

The rubocop warnings that are causing the tests to fail are false positives, there are a bunch of new issues today on the rubocop project highlighting the same issue with the new 1.6.0 version.

We can either wait for it to be fixed there, downgrade rubocop or ignore these warnings for now.

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