I have a Stimulus controller that has two dates. I want to issue a GET to my controller with these two dates and have the controller return a partial filled with data relevant to these two dates. Seems simple enough.
Is there an example out there of how to do this simple thing with Turbo and Stimulus? It seems like this is an ideal use case for HTML over the wire… but the examples I have seen don’t seemingly do this.
The select element, in that case, calls a method in the Stimulus Controller that in turns makes use of @rails/request.js to make a GET call to a non-Rest method on the Controller.
This method returns a turbo_stream.erb partial that will replace the dom with the right HTML.
Thank you! I did finally find some articles by others about their journey and getting it working. I got it working myself, and in the process learned a few things. I will check out your info here too, and hopefully it just adds to my toolbox.