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

chore[#50212]: Use attr options reader

Kabiru Mwenja63692ab6a7ee
diff --git a/app/components/open_project/common/clipboard_copy_component.rb b/app/components/open_project/common/clipboard_copy_component.rb
index 9c713bcba81..bcff2b06727 100644
--- a/app/components/open_project/common/clipboard_copy_component.rb
+++ b/app/components/open_project/common/clipboard_copy_component.rb
@@ -37,8 +37,8 @@ module OpenProject::Common
required: false
def text_field_options
- { name: @options[:name],
- label: @options[:label],
+ { name: options[:name],
+ label: options[:label],
classes: "rounded-right-0",
visually_hide_label:,
value: value_to_copy,
@@ -62,11 +62,11 @@ module OpenProject::Common
end
def clipboard_copy_aria_label
- @options[:clipboard_copy_aria_label] || I18n.t('button_copy_to_clipboard')
+ options[:clipboard_copy_aria_label] || I18n.t('button_copy_to_clipboard')
end
def value_to_copy
- @options[:value_to_copy]
+ options[:value_to_copy]
end
end
end