mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-07 21:38:14 -08:00
27 lines
621 B
Text
27 lines
621 B
Text
<%= form_with(model: example) do |form| %>
|
|
<% if example.errors.any? %>
|
|
<div style="color: red">
|
|
<h2><%= pluralize(example.errors.count, "error") %> prohibited this example from being saved:</h2>
|
|
|
|
<ul>
|
|
<% example.errors.each do |error| %>
|
|
<li><%= error.full_message %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div>
|
|
<%= form.label :text, style: "display: block" %>
|
|
<%= form.text_field :text %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= form.label :body, style: "display: block" %>
|
|
<%= form.text_area :body %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= form.submit %>
|
|
</div>
|
|
<% end %>
|