rails turbo frame load new pages instead of showing " Response has no matching" error

182 Views Asked by At

i am on rails 7 trying out the turbo frame.

supposedly my code should fire a Response has no matching error because i do not have the similar id in the new page after clicking the new link. however it just loads the new page as usual, contradict with a tutorial. any idea how do i get the error logged instead of loading a new page? thanks.

# app/views/quotes/index.html.erb 

<main class="container">
  <%= turbo_frame_tag "first_turbo_frame" do %>
    <div class="header">
      <h1>Quotes</h1>
      <%= link_to "New quote", new_quote_path, class: "btn btn--primary" %>
    </div>
  <% end %>

  <%= render @quotes %>
</main>
# app/views/quotes/new.html.erb 

<h1>New quote</h1>

<%= render "form", quote: @quote %>
0

There are 0 best solutions below