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

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

<% end %>
<%= form.label :name, style: "display: block" %> <%= form.text_field :name %>
<%= form.label :amount, style: "display: block" %> <%= form.text_field :amount %>
<%= form.label :pricing_type, style: "display: block" %> <%= form.text_field :pricing_type %>
<%= form.submit %>
<% end %>