about summary refs log tree commit diff
path: root/app/views/machines/_form.html.erb
diff options
context:
space:
mode:
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 %>