<%= form_with(model: event) do |form| %>
<% if event.errors.any? %>
<%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:
<% event.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :date, style: "display: block" %>
<%= form.date_field :date %>
<%= form.label "Event name", style: "display: block" %>
<%= form.text_field :name %>
<%= form.label "Organisation", style: "display: block" %>
<%= form.select :organisation, Organisation.all.collect { |o| [ o.name, o.id ] }, include_blank: true %>
<%= form.submit style: "background: green; color: white; margin-top: 1.1em;"%>
<% end %>
<%= form_with(model: event) do |form| %>
<% if event.errors.any? %>
<%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:
<% event.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :date, style: "display: block" %>
<%= form.date_field :date %>
<%= form.label "Event name", style: "display: block" %>
<%= form.text_field :name %>
<%= form.submit style: "background: green; color: white; margin-top: 1.1em;"%>
<% end %>