From d96c51168e3901f20cc66e8e2d73552f0491cdca Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 14 Nov 2019 18:19:22 +0800 Subject: [PATCH] Update show.html.erb fix error when @entries.first is nil --- app/views/admin/universal_tables/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/universal_tables/show.html.erb b/app/views/admin/universal_tables/show.html.erb index 868bd46..611df79 100644 --- a/app/views/admin/universal_tables/show.html.erb +++ b/app/views/admin/universal_tables/show.html.erb @@ -27,7 +27,7 @@ - <% can_edit = can_edit_or_delete?(@entries.first.u_table) %> + <% can_edit = can_edit_or_delete?(@entries.first.u_table) if !(@entries.first.nil?) %> <% @entries.each do |entry| %> <% @columns.each_with_index do |column, index| %>