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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Move the repeated v3_paths line into its own method
Marcello Rochac59c182c870c
diff --git a/lib/open_project/object_linking.rb b/lib/open_project/object_linking.rbindex 4cc04444ee6..2dc213bceea 100644--- a/lib/open_project/object_linking.rb+++ b/lib/open_project/object_linking.rb@@ -146,9 +146,6 @@ module OpenProjectenddef url_to_attachment(attachment, only_path: true)- # Including the module breaks the application in strange and mysterious ways- v3_paths = API::V3::Utilities::PathHelper::ApiV3Path-if only_pathv3_paths.attachment_content(attachment.id)else@@ -157,13 +154,16 @@ module OpenProjectenddef url_to_file_link(file_link, only_path: true)- v3_paths = API::V3::Utilities::PathHelper::ApiV3Path-if only_pathv3_paths.file_link_open(file_link.id)elsev3_paths.url_for(:file_link_open, file_link.id)endend++ def v3_paths+ # Including the module breaks the application in strange and mysterious ways+ API::V3::Utilities::PathHelper::ApiV3Path+ endendend