summaryrefslogtreecommitdiff
path: root/app/views/wines/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/wines/_form.html.erb')
-rw-r--r--app/views/wines/_form.html.erb33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/views/wines/_form.html.erb b/app/views/wines/_form.html.erb
new file mode 100644
index 0000000..fe676b2
--- /dev/null
+++ b/app/views/wines/_form.html.erb
@@ -0,0 +1,33 @@
+<!-- -*- mode: web; -*- -->
+
+<%= form_with model: wine do |form| %>
+ <div>
+ <%= form.label :name %><br>
+ <%= form.text_field :name %>
+ <% wine.errors.full_messages_for(:name).each do |message| %>
+ <div><%= message %></div>
+ <% end %>
+ </div>
+
+ <div>
+ <%= form.label :year %><br>
+ <%= form.text_field :year %>
+ <% wine.errors.full_messages_for(:year).each do |message| %>
+ <div><%= message %></div>
+ <% end %>
+ </div>
+
+ <div>
+ <%= form.label :variety %><br>
+ <%= form.text_field :variety %>
+ </div>
+
+ <div>
+ <%= form.label :notes %><br>
+ <%= form.text_field :notes %>
+ </div>
+
+ <div>
+ <%= form.submit %>
+ </div>
+<% end %>
Copyright 2019--2024 Marius PETER