Skip to content

Instantly share code, notes, and snippets.

@grodriguez1983
Created December 18, 2023 15:13
app/views/shopping_lists/
<%= form_with(model: shopping_list, class: "mb-7") do |form| %>
<div class="mb-5">
<%= form.text_field :title, placeholder: "Create new shopping list", class: "placeholder:italic placeholder:text-slate-400 block bg-white w-full border border-slate-300 rounded-md py-2 px-2 shadow-sm focus:outline-none focus:border-sky-500 focus:ring-sky-500 focus:ring-1 sm:text-sm" %>
<%= form.submit "Save", class: "bg-sky-500 hover:bg-sky-600 active:bg-sky-700 focus:outline-none focus:ring focus:ring-sky-300 rounded-md py-2 px-9 mt-8" %>
</div>
<% end %>
<div class="flex m-2">
<%= shopping_list.title %>
</div>
<div class="flex-col w-1/2">
<h1 class="font-bold text-xl">Shopping Lists</h1>
<div class="mt-8">
<%= render "form", shopping_list: @shopping_list %>
</div>
<%= render @shopping_lists %>
</div>
<div class="flex-col w-1/2">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment