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

obey rubocop

as-op12c70ffac113
diff --git a/modules/meeting/app/workers/meetings/pdf/common/agenda.rb b/modules/meeting/app/workers/meetings/pdf/common/agenda.rb
index ddca6815070..6510030c514 100644
--- a/modules/meeting/app/workers/meetings/pdf/common/agenda.rb
+++ b/modules/meeting/app/workers/meetings/pdf/common/agenda.rb
@@ -28,7 +28,6 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-
module Meetings::PDF::Common::Agenda
def write_agenda
return if meeting.sections.empty?
diff --git a/modules/meeting/app/workers/meetings/pdf/default/agenda.rb b/modules/meeting/app/workers/meetings/pdf/default/agenda.rb
index dd916bea655..bcd81860a49 100644
--- a/modules/meeting/app/workers/meetings/pdf/default/agenda.rb
+++ b/modules/meeting/app/workers/meetings/pdf/default/agenda.rb
@@ -41,7 +41,7 @@ module Meetings::PDF::Default::Agenda
def write_section(section, section_index)
write_optional_page_break
- unless section.title.blank? && section_index == 0 && meeting.sections.count == 1
+ unless section.title.blank? && section_index == 0 && meeting.sections.one?
write_section_title(section, section_index)
end
write_agenda_items(section)
diff --git a/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb b/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb
index 773577b554d..f329027c496 100644
--- a/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb
+++ b/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb
@@ -54,9 +54,9 @@ module Meetings::PDF::Minutes::Agenda
def write_section_title_table(section, index)
pdf.table(
[[
- { content: "#{index + 1}." },
- { content: format_agenda_section_title_cell(section) }
- ]],
+ { content: "#{index + 1}." },
+ { content: format_agenda_section_title_cell(section) }
+ ]],
width: pdf.bounds.width,
column_widths: [40, pdf.bounds.width - 40],
cell_style: { inline_format: true }.merge(styles.agenda_section_title_cell)
@@ -100,9 +100,9 @@ module Meetings::PDF::Minutes::Agenda
with_vertical_margin(styles.agenda_item_title_margins) do
pdf.table(
[[
- { content: "#{section_index + 1}.#{index + 1}." },
- { content: title }
- ]],
+ { content: "#{section_index + 1}.#{index + 1}." },
+ { content: title }
+ ]],
width: pdf.bounds.width,
column_widths: [40, pdf.bounds.width - 40],
cell_style: { inline_format: true }.merge(styles.agenda_item_title_cell)