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 Contreras62f7cc3088f6
diff --git a/app/components/open_project/common/attribute_component.rb b/app/components/open_project/common/attribute_component.rb
index e675f3b1c66..6690f494622 100644
--- a/app/components/open_project/common/attribute_component.rb
+++ b/app/components/open_project/common/attribute_component.rb
@@ -30,7 +30,6 @@ require 'nokogiri'
module OpenProject
module Common
class AttributeComponent < Primer::Component
-
def initialize(id, name, description, **args)
super
@id = id
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb
index 5219058453a..8e2b41fbb2b 100644
--- a/app/components/projects/row_component.rb
+++ b/app/components/projects/row_component.rb
@@ -112,14 +112,19 @@ module Projects
return nil unless user_can_view_project?
if project.status_explanation.present? && project.status_explanation
- render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-status-explanation", I18n.t('activerecord.attributes.project.status_explanation'), project.status_explanation)
+ render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-status-explanation",
+ I18n.t('activerecord.attributes.project.status_explanation'),
+ project.status_explanation)
end
end
def description
return nil unless user_can_view_project?
+
if project.description.present?
- render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-description", I18n.t('activerecord.attributes.project.description'), project.description)
+ render OpenProject::Common::AttributeComponent.new("dialog-#{project.id}-description",
+ I18n.t('activerecord.attributes.project.description'),
+ project.description)
end
end