<%= form_with(model: foo, local: true) do |form| %> <% if foo.errors.any? %>

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

<% end %>
<%= form.submit %>
<% end %>