- <%= link_to 'Article 1', article_path(1), data: { turbo_frame: 'article' } %>
- <%= link_to 'Article 2', article_path(2), data: { turbo_frame: 'article' } %>
<%= turbo_frame_tag 'article' %>
TurboFrame 対象外
<%= turbo_frame_tag 'article' do %>
<%= @article.title %>
<%= @article.content %>
<% end %>
show.html.erb
index.html.erb
TurboFrame で読み込んだ
ものを表示する場所を定義
TurboFrame で読み込んだ
ものを表示する場所を定義
反映先の Frame を指定
これだけで、できる