blob: db05a72c3e32c626a6c869cfb10db83b9f934a7a (
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" %>
<%= form.date_field :date %>
</div>
<div>
<%= form.label :name, style: "display: block" %>
<%= form.text_field :name %>
</div>
<div>
<%= form.submit %>
</div>
<% end %>
|