Files
doable/app/views/todos/_form.html.erb
Tarek Belkahia 6776729eab
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Scaffold Todo
2025-10-27 10:18:59 +01:00

28 lines
619 B
Plaintext

<%= form_with(model: todo) do |form| %>
<% if todo.errors.any? %>
<div style="color: red">
<h2><%= pluralize(todo.errors.count, "error") %> prohibited this todo from being saved:</h2>
<ul>
<% todo.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.label :description, style: "display: block" %>
<%= form.textarea :description %>
</div>
<div>
<%= form.submit %>
</div>
<% end %>