I didn't understand how to best implement a system machine. Current, I'm working on a project that has a model X and it has a lot of status, and each status has a transaction to another one, and do a lot of things when changed. i would like to know more about how to avoid these transactions and use a restfull approach
Great stuff about featured flag on photos. But "there can be only one featured photo" requirement was like a trigger for me. I immediately thought that it would be even better to create a separate resource featured_photo with only update action. This action should accept only one parameter: photo id. But then there will be several ways in which we can handle unfeaturing of the photo. And none of them are intuitive enough.
Being restful makes things much easier. Avoiding State machine gems is the way to go, they couple data with behaviour. Models should ONLY read/write their data. Having nested actions for every state transaction? Seems very reasonable. Thanks
One of the best talks of entire conference. Great work, Derek!
Thank you!
Nice one. I'm a podcast listener and totally enjoyed your talk
Thanks!
I didn't understand how to best implement a system machine. Current, I'm working on a project that has a model X and it has a lot of status, and each status has a transaction to another one, and do a lot of things when changed. i would like to know more about how to avoid these transactions and use a restfull approach
Great stuff about featured flag on photos. But "there can be only one featured photo" requirement was like a trigger for me. I immediately thought that it would be even better to create a separate resource featured_photo with only update action. This action should accept only one parameter: photo id. But then there will be several ways in which we can handle unfeaturing of the photo. And none of them are intuitive enough.
Being restful makes things much easier. Avoiding State machine gems is the way to go, they couple data with behaviour. Models should ONLY read/write their data. Having nested actions for every state transaction? Seems very reasonable. Thanks
I got a question,
what does
```
new(photo).call
```
do ?
here's the timestamp - th-cam.com/video/HctYHe-YjnE/w-d-xo.html
That calls `new` on the current class, so it's equivalent to `AddFeatureFlag.new(photo).call`
Thank you. Yeah, I should've got it. I guess I got confused cause never saw it before.
👌🏽