diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-18 19:38:44 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-18 19:38:44 +0000 |
commit | 8185939b2629581dd9264dbbc37f859e19436f31 (patch) | |
tree | fdbc4f11f8d6c911ac7ebc4563254ae5299db603 /app/views/organisations/_form.html.erb | |
parent | 1fe9bf5c59ba9d4df5d2c917896348a0e23613a0 (diff) |
wip: stuck on notnull error...
Diffstat (limited to 'app/views/organisations/_form.html.erb')
-rw-r--r-- | app/views/organisations/_form.html.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/organisations/_form.html.erb b/app/views/organisations/_form.html.erb new file mode 100644 index 0000000..ebe8ea3 --- /dev/null +++ b/app/views/organisations/_form.html.erb @@ -0,0 +1,22 @@ +<%= form_with(model: organisation) do |form| %> + <% if organisation.errors.any? %> + <div style="color: red"> + <h2><%= pluralize(organisation.errors.count, "error") %> prohibited this organisation from being saved:</h2> + + <ul> + <% organisation.errors.each do |error| %> + <li><%= error.full_message %></li> + <% end %> + </ul> + </div> + <% end %> + + <div> + <%= form.label :name, style: "display: block" %> + <%= form.text_field :name %> + </div> + + <div> + <%= form.submit %> + </div> +<% end %> |