You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a question regarding how to handle state transitions initiated from controllers.
before using state machines, we had very simple update code in controllers, basically object.update(object_params) where object_params was a hash that could potentially contain a status key with the new value.
We are not supposed to use this anymore, so I wanted to know what you would suggest as the best way to handle it.
My feeling is that possible transitions should be exposed up to the views, and that we should only be working with that.
In the case of API controllers, we might want to update some parameters, and we definitely want to do this in a single call to our back end.
We also would like to do a single update to the object instead of two. can we pass params to a transition ? how would you suggest to do this ?
thanks for the gem!
The text was updated successfully, but these errors were encountered:
Hi,
I had a question regarding how to handle state transitions initiated from controllers.
before using state machines, we had very simple update code in controllers, basically
object.update(object_params)
where object_params was a hash that could potentially contain a status key with the new value.We are not supposed to use this anymore, so I wanted to know what you would suggest as the best way to handle it.
My feeling is that possible transitions should be exposed up to the views, and that we should only be working with that.
In the case of API controllers, we might want to update some parameters, and we definitely want to do this in a single call to our back end.
We also would like to do a single update to the object instead of two. can we pass params to a transition ? how would you suggest to do this ?
thanks for the gem!
The text was updated successfully, but these errors were encountered: