I want to do something like this in a method in my controller
# Update whole page (A)
respond_to do |format|
If the link that triggers the request causes something major to happen, I want a full page update, otherwise I just a want a more finely targeted turbo_stream update.
So in ‘A’ I want to re-render the whole body of the page (as if there was a data-turbo-frame=“_top” attribute in the link from where the request originated).
I’ve currently got round this by making the whole content of the page a partial and wrapping it in its own turbo_frame, which I can then target with a turbo_stream, but I expect there is a cleaner way…