gpt4 book ai didi

ruby-on-rails - 在 state_machine rails 中获取以前的状态

转载 作者:数据小太阳 更新时间:2023-10-29 07:34:46 28 4
gpt4 key购买 nike

我正在使用 state_machine on rails 开发状态机,这里我定义了不同的状态,根据条件状态将更改为另一个状态。这里我的问题是如何获得以前的状态?我的第二个问题是如何列出状态机中的所有状态?

i will explain my question with example say i have 3 states say state1,state2,state3 initially it will be in state1. when event1 is executed state changes from state1=>state2 , now i wanted to know which is my previous state. kindly help me out in figuring out this.

最佳答案

关于ruby-on-rails - 在 state_machine rails 中获取以前的状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8742576/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com