<%= form_with(model: event) do |form| %> <% if event.errors.any? %>

<%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:

<% end %>
<%= form.label :date, style: "display: block", class: "form-label" %> <%= form.date_field :date, class: "form-control" %>
<%= form.label :name, style: "display: block", class: "form-label" %> <%= form.text_field :name, class: "form-control" %>
<%= form.submit class: "btn btn-primary mt-2"%>
<% end %>