From 83d3d27f15007cf0d91bcd6fecf6d4ab8c6a8881 Mon Sep 17 00:00:00 2001 From: Lanya Butler Date: Mon, 16 Jul 2018 12:46:31 -0400 Subject: [PATCH] feat(Add category drop-down menu --- app/views/items/_form.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/items/_form.html.erb b/app/views/items/_form.html.erb index f3ae7a92d9..eef492f5e2 100644 --- a/app/views/items/_form.html.erb +++ b/app/views/items/_form.html.erb @@ -8,7 +8,12 @@ <%= f.input :category, label: "Category", wrapper: :vertical_input_group do %> - <%= f.input_field :category, class: "form-control" %> + <%= f.input_field :category, class: "form-control", list:"category" %> + + <%- Item.all.map(&:category).uniq.each do |category| %> + + <% end %> + <% end %> <%= f.button :submit, class:"btn btn-info"%>