Disable sorttable on tables without rows
Otherwise, the first element of the table body is being fetched which might result in an error for empty tables. Fixes CODEOCEAN-JZ
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
h1 = ErrorTemplate.model_name.human(count: 2)
|
||||
|
||||
.table-responsive
|
||||
table.sortable.table
|
||||
table.table class="#{@error_templates.present? ? 'sortable' : ''}"
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.error_template.name')
|
||||
|
@ -13,7 +13,7 @@ h2.mt-4
|
||||
= t 'error_templates.attributes'
|
||||
|
||||
.table-responsive
|
||||
table.sortable.table
|
||||
table.table class="#{@error_templates.error_template_attributes.present? ? 'sortable' : ''}"
|
||||
thead
|
||||
tr
|
||||
th
|
||||
|
Reference in New Issue
Block a user