From 086ddaada723ad0aaac4e3c567bea63fee5d19c5 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Tue, 8 Nov 2022 17:18:43 -0800 Subject: [PATCH] refactor(table): helper cleanup --- docs/lib/sage_rails/app/helpers/sage_table_helper.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/lib/sage_rails/app/helpers/sage_table_helper.rb b/docs/lib/sage_rails/app/helpers/sage_table_helper.rb index a7e285f178..81b26dfff4 100644 --- a/docs/lib/sage_rails/app/helpers/sage_table_helper.rb +++ b/docs/lib/sage_rails/app/helpers/sage_table_helper.rb @@ -238,9 +238,7 @@ def sage_table_wrapper_classes(table, is_responsive) def sage_table_caption_classes(table) table_caption_classlist = "sage-table__caption" - if table.caption_side - table_caption_classlist << " sage-table__caption--#{table.caption_side}" - end + table_caption_classlist << " sage-table__caption--#{table.caption_side}" if table.caption_side return table_caption_classlist end @@ -256,10 +254,10 @@ def sage_table_row_classes(table) end def sage_table_cell_classes(table) - table_cell_classlist = "" + table_cell_classlist = "sage-table-cell" if table.has_borders - table_cell_classlist << "sage-table-cell--borders" + table_cell_classlist << " sage-table-cell--borders" end return table_cell_classlist