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

Run `rubocop -a` on app/components

Aaron Contrerasab2d0efc4abc
diff --git a/app/components/admin/quarantined_attachments/row_component.rb b/app/components/admin/quarantined_attachments/row_component.rb
index 2f17b4b3b95..392929a4db1 100644
--- a/app/components/admin/quarantined_attachments/row_component.rb
+++ b/app/components/admin/quarantined_attachments/row_component.rb
@@ -42,9 +42,7 @@ module Admin
"quarantined_attachment_#{attachment.id}"
end
- def filename
- attachment.filename
- end
+ delegate :filename, to: :attachment
def attached_to
description = attachment.description.present? ? "(#{attachment.description})" : ''
@@ -89,7 +87,7 @@ module Admin
{ controller: '/admin/attachments/quarantined_attachments', action: :destroy, id: model },
title: I18n.t('antivirus_scan.quarantined_attachments.delete'),
method: :delete,
- data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) },
+ data: { confirm: I18n.t(:text_are_you_sure), disable_with: I18n.t(:label_loading) }
)
end
end
diff --git a/app/components/members/row_component.rb b/app/components/members/row_component.rb
index b388a71794f..a1bb6fc7857 100644
--- a/app/components/members/row_component.rb
+++ b/app/components/members/row_component.rb
@@ -77,9 +77,9 @@ module Members
def shared
count = member.shared_work_packages_count
if count > 0
- link_to I18n.t(:'label_x_work_packages', count:),
+ link_to I18n.t(:label_x_work_packages, count:),
helpers.project_work_packages_shared_with_path(principal, member.project),
- target: "_blank"
+ target: "_blank", rel: "noopener"
end
end
diff --git a/app/components/projects/projects_filters_component.rb b/app/components/projects/projects_filters_component.rb
index db33c2ccb9a..6ffc4af774a 100644
--- a/app/components/projects/projects_filters_component.rb
+++ b/app/components/projects/projects_filters_component.rb
@@ -29,7 +29,6 @@
# ++
class Projects::ProjectsFiltersComponent < FiltersComponent
-
def allowed_filters
super
.select { |f| allowed_filter?(f) }