You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
621 B
28 lines
621 B
<%= 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 %>
|