Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Small BorderBoxTableComponent optimizations

Alexander Brandon Colesf62e62391211
diff --git a/app/components/op_primer/border_box_table_component.rb b/app/components/op_primer/border_box_table_component.rb
index f1d5ee52c9f..7ecee947688 100644
--- a/app/components/op_primer/border_box_table_component.rb
+++ b/app/components/op_primer/border_box_table_component.rb
@@ -82,8 +82,8 @@ module OpPrimer
end
def column_title(name)
- header = headers.find { |h| h[0] == name }
- header ? header[1][:caption] : nil
+ _, header_options = headers.assoc(name)
+ header_options&.dig(:caption)
end
def header_classes(column)