Can I change the nature of a Turbo request in the controller?

I want to do something like this in a method in my controller

...
if @major_change
  # Update whole page (A)
else
  respond_to do |format|
    format.turbo_stream
  end
end

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…

Thanks

Daniel

A solution could be

if @major_change

respond_to do |format|
    format.turbo_stream redirect_to major_change_path
  end

else
  respond_to do |format|
    format.turbo_stream
  end
end