Update show.html.erb

fix error when @entries.first is nil
This commit is contained in:
chiu 2019-11-14 18:19:22 +08:00
parent 4da6436267
commit d96c51168e
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@
</tr>
</thead>
<tbody>
<% 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| %>
<tr>
<% @columns.each_with_index do |column, index| %>