I propose adding the update_most_recent method to the Transition adapter module. This enhancement will help eliminate duplicated code and improve maintainability by providing a standard way to update the most recent transition on destruction.
Motivation:
Currently, users need to implement this logic themselves, resulting in duplicated code and potential errors. By adding this method to the core, we can ensure consistency and improve code quality.
At present, there are only two modules, ActiveRecordTransition and MemoryTransition. The proposed update is to add code duplication to the ActiveRecordTransition module.
I propose adding the update_most_recent method to the Transition adapter module. This enhancement will help eliminate duplicated code and improve maintainability by providing a standard way to update the most recent transition on destruction.
Motivation:
Currently, users need to implement this logic themselves, resulting in duplicated code and potential errors. By adding this method to the core, we can ensure consistency and improve code quality.
At present, there are only two modules,
ActiveRecordTransition
andMemoryTransition
. The proposed update is to add code duplication to theActiveRecordTransition
module.The following code demonstrates how to use this method in a transition model: