From e3c7047999391ea1da86f42a1a1372733bd4d909 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 21 Apr 2016 13:29:58 -0400 Subject: [PATCH] Update index.html.erb --- app/views/vehicles/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/vehicles/index.html.erb b/app/views/vehicles/index.html.erb index 4fd1874..15a0f37 100644 --- a/app/views/vehicles/index.html.erb +++ b/app/views/vehicles/index.html.erb @@ -16,7 +16,7 @@ <% Vehicle.all.each do |vehicle| %>
- <%= vehicle.qbo_customer.name %> <%= vehicle.to_s %> <%= button_to "Edit", vehicle, method: :edit %> <%= button_to "Delete", vehicle, method: :delete, data: {confirm: "You sure?"} %> + <%= vehicle.qbo_customer.name if vehicle.qbo_customer %> <%= vehicle.to_s %> <%= button_to "Edit", vehicle, method: :edit %> <%= button_to "Delete", vehicle, method: :delete, data: {confirm: "You sure?"} %>
<% end %>