You can, but typically, I don't like passing "complex" objects into background jobs as parameters. I know that Global Id is just a string and that would work, but it always feels better to be a bit more explicit with what I'm passing instead of passing an Object which gets converted into a String. So, I think it may be more of a personal choice/style.
richard_wiltshire I've updated the code. For some reason, I didn't have it committed and sent up the previous episodes. I wish I could say that this is the first time that this has happened. The zipped code has also been updated. I think that there is a caching issue going on so the Code browser tab isn't reflecting the latest code.
It's just a "fancy" way to add the data-action without having to add it manually. It does lose some visibility within the HTML view that there is an action that will be triggered, but given the stimulus controller's functionality, it would be expected. If you had many toggles on the same page, the extra noise could be distracting and also leave more room for errors.
Check out some of the Kamal videos. I've been using Kamal for a lot of my deployments and it's been a great experience (once things are working). The biggest thing that I've found to be "clueless"/no errors when first deploying is the lack of any error messages. Typically when this happens on the first deployments, it's usually because of a database url/setting not correct within the config. (there's no error outputs when running the docker entrypoint script)