Rails Turbo Frame Tag wrong number of arguments error

939 views Asked by At

I've upgraded to rails 6.1 from rails 6.0 and trying out Hotwire, but I am getting an error when trying to run my application:

wrong number of arguments (given 0, expected 1..4)
Extracted source (around line #1):
  <%= turbo_frame_tag 'branch' do %> 

my code in my edit.html.erb:

<%= turbo_frame_tag 'post' do %> 
   <h3>Edit post</h3>
       <%= render 'form', post: @post %>
<% end %>

my code in my _form.html.erb:

<%= form_with(model: post, local: true) do |form| %>
  <% if post.errors.any? %>
    <h5><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h5>
      <ul class="browser-default">
        <% post.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
  <% end %>

  <div class="form-field">
    <div class="input-field">
      <%= form.text_field :title %>
      <%= form.label :title %>
    </div>
  </div>

  <br>

  <div class="form-field">
    <div class="input-field">
      <%= form.text_field :description %>
      <%= form.label :description %>
    </div>
  </div>


  <div class="actions"><%= submit_tag "Submit", :type=>"submit", :class=>"btn", :data => { :disable_with => "Processing" } %></div>
<% end %>

my code in my show.html.erb:

<%= turbo_frame_tag 'branch' do %> 
   <h3><%= @post.title %></h3>
   <p><%= @post.description %></p>
<% end %>

Does anybody have an idea what I might have missed during the upgrade process? I ran rails turbo:install and also rails hotwire:install or am I missing something in the turbo frame tag?

0

There are 0 answers