From f33203b0e39e3b0db4f4c4c8b2cb96787ce8da18 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 28 Jul 2016 20:48:34 -0400 Subject: [PATCH] Search --- app/views/customers/index.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/customers/index.html.erb b/app/views/customers/index.html.erb index 86f95a3..f3d2bdf 100644 --- a/app/views/customers/index.html.erb +++ b/app/views/customers/index.html.erb @@ -4,6 +4,9 @@ <%= text_field_tag :search, params[:search], placeholder: "Search Customers" %> <%= submit_tag "Search" %> <% end %> +
+<% if @customers.present? %> +
<% @customers.each do |c| %>
@@ -16,6 +19,10 @@
<% end %> +<% else %> +

There are no posts containing the term(s) <%= params[:search] %>.

+<% end %> +