<%= form_with(model: [comment.recipe, comment]) do |form| %>
  <% if comment.errors.any? %>
    <div style="color: red">
      <h2><%= pluralize(comment.errors.count, "error") %> prohibited this comment from being saved:</h2>

      <ul>
        <% comment.errors.each do |error| %>
          <li><%= error.full_message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div class="form-group mb-3">
    <%= form.label :comment, class: "form-label" %>
    <%= form.text_area :comment, class: "form-control" %>
  </div>

  <div class="form-group mb-3">
    <%= form.submit class: "btn btn-primary" %>
  </div>
<% end %>
