Add header to the table

This commit is contained in:
Jean-Baptiste Bellet
2022-03-21 21:12:24 +01:00
parent 5c5a0c98f1
commit d4cfa7b368

View File

@@ -12,4 +12,12 @@
#products_table
%table
= render(ProductComponent.with_collection(@products, columns: @columns_selected))
%thead
%tr
%th
Name
- @columns_selected.each do |column|
%th
= @columns.find{ |c| c[:value] == column }[:label]
%tbody
= render(ProductComponent.with_collection(@products, columns: @columns_selected))