Given the following
<%= turbo_frame_tag dom_id(@item, "loader_helper"), src: home_index_path(@item) %>
This code will trigger with page load other request to specified controller
Started GET "/home/1" for ::1 at 2023-01-23 16:10:39 +0300
Processing by HomeController#index as HTML
The problem is that I want to render not HTML, but rather turbo_stream format with some page modifications and don't rely on some JS solution.
So I would expect the following pseudocode to work
<%= turbo_frame_tag dom_id(@item, "loader_helper"), src: home_index_path(@item), format: :turbo_stream %>
to load action like so
Started GET "/home/1" for ::1 at 2023-01-23 16:10:39 +0300
Processing by HomeController#index as TURBO_STREAM
and then in controller I can handle it with specific formats
..
def index
respond_to do |format|
format.html
format.turbo_stream
end
end
Are there any workarounds? Or this is intended by design, so we won't be able to trigger turbo_stream on page load (you can do it with js easily), and manipulate with some HTML.