33 lines
745 B
Plaintext
33 lines
745 B
Plaintext
<%= form_with(model: suggestion) do |form| %>
|
|
<% if suggestion.errors.any? %>
|
|
<div style="color: red">
|
|
<h2><%= pluralize(suggestion.errors.count, "error") %> prohibited this suggestion from being saved:</h2>
|
|
|
|
<ul>
|
|
<% suggestion.errors.each do |error| %>
|
|
<li><%= error.full_message %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div>
|
|
<%= form.label :subject, style: "display: block" %>
|
|
<%= form.text_field :subject %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= form.label :body, style: "display: block" %>
|
|
<%= form.text_area :body %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= form.label :sent, style: "display: block" %>
|
|
<%= form.check_box :sent %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= form.submit %>
|
|
</div>
|
|
<% end %>
|