Closed pedro-pedrosa closed 1 year ago
Upon thorough review I found out that this is happening because I have single table inheritance in my transition classes, but the query to update the old transitions most_recent
to false is not taking this into consideration.
I have a PR with a proposed fix #503
PR has been merged so this can be closed
Defining my state machines as
and my model as:
Then when one of these state machines transitions to a different state, the
most_recent
column is set to a falsey value on the other state machine:Does this gem not support multiple state machines on a single model? From the usage of
Statesman::Adapters::ActiveRecordQueries
this seems to be the case since at least there can only be onein_state
defined per model, however this used to work in an earlier version (4.0.0) but doesn't work anymore on 10.1.0