%= form_with(model: post) do |form| %>
<% if post.errors.any? %>
<%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:
<% post.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :title, style: "display: block" %>
<%= form.text_field :title %>
<%= form.label :body, style: "display: block" %>
<%= form.text_area :body %>
<%= form.submit %>
<% end %>