blob: da7f932ddca768a85933654f1e6a529f237aad85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<%= form_with(model: event) do |form| %>
<% if event.errors.any? %>
<div style="color: red">
<h2><%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:</h2>
<ul>
<% event.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div>
<%= form.label :date, style: "display: block", class: "form-label" %>
<%= form.date_field :date, class: "form-control" %>
</div>
<div>
<%= form.label :name, style: "display: block", class: "form-label" %>
<%= form.text_field :name, class: "form-control" %>
</div>
<div>
<%= form.submit class: "btn btn-primary mt-2"%>
</div>
<% end %>
|