about summary refs log tree commit diff
path: root/app/views/machines/_form.html.erb
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2021-08-21 19:30:19 -0400
committerBen Harris <ben@tilde.team>2021-08-21 19:30:33 -0400
commit819a3edae405227f11283ad494a7f4ca9c771467 (patch)
tree8da57ee1777f992f4f13879795916615009f6a53 /app/views/machines/_form.html.erb
init
Diffstat (limited to 'app/views/machines/_form.html.erb')
-rw-r--r--app/views/machines/_form.html.erb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/machines/_form.html.erb b/app/views/machines/_form.html.erb
new file mode 100644
index 0000000..6d7aff3
--- /dev/null
+++ b/app/views/machines/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_with model: @machine do |form| %>
+  <div>
+    <%= form.label :name %><br>
+    <%= form.text_field :name %>
+    <% @machine.errors.full_messages_for(:name).each do |message| %>
+      <div><%= message %></div>
+    <% end %>
+  </div>
+
+  <div>
+    <%= form.label :edition %><br>
+    <%= form.text_field :edition %>
+    <% @machine.errors.full_messages_for(:edition).each do |message| %>
+      <div><%= message %></div>
+    <% end %>
+  </div>
+
+  <div>
+    <%= form.submit %>
+  </div>
+<% end %>