From 1a043bea7670700c44f8f9fcf64169a8e3cee1fc Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Tue, 4 Apr 2017 22:26:58 -0400 Subject: [PATCH] Added Permission Check --- app/views/customers/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/customers/index.html.erb b/app/views/customers/index.html.erb index e0bba54..7f1b872 100644 --- a/app/views/customers/index.html.erb +++ b/app/views/customers/index.html.erb @@ -4,7 +4,7 @@ <%= text_field_tag :search, params[:search], placeholder: "Search Customers" %> <%= submit_tag "Search" %> <% end %> -<%= button_to "New Customer", new_customer_path, method: :get%> +<%= button_to("New Customer", new_customer_path, method: :get) if allowed_to?(:add_customers)%>
<% if @customers.present? %>