Added customer composite key
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
<div id="<%= dom_id customer %>">
|
||||
<p class="my-5">
|
||||
<strong class="block font-medium mb-1">Name:</strong>
|
||||
<%= customer.name %>
|
||||
<strong class="block font-medium mb-1">First Name:</strong>
|
||||
<%= customer.first_name %>
|
||||
</p>
|
||||
|
||||
<p class="my-5">
|
||||
<strong class="block font-medium mb-1">Surname:</strong>
|
||||
<%= customer.surname %>
|
||||
</p>
|
||||
|
||||
<p class="my-5">
|
||||
|
||||
@@ -12,8 +12,13 @@
|
||||
<% end %>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :name %>
|
||||
<%= form.text_field :name, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
|
||||
<%= form.label :first_name %>
|
||||
<%= form.text_field :first_name, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :surname %>
|
||||
<%= form.text_field :surname, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<% @customers.each do |customer| %>
|
||||
<%= render customer %>
|
||||
<p>
|
||||
<%= link_to "Show this customer", customer, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<%= link_to "Show this customer", customer_path(customer), class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user