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
Improvement #5
Dombi Attila53b77fadff2c
diff --git a/lib/api/v3/utilities/path_helper.rb b/lib/api/v3/utilities/path_helper.rbindex 499ec95eac2..7ef5721240e 100644--- a/lib/api/v3/utilities/path_helper.rb+++ b/lib/api/v3/utilities/path_helper.rb@@ -41,7 +41,7 @@ module APIpath ||= plural_namedefine_singleton_method(plural_name) do- "#{root}/#{path}"+ RequestStore.store[:"cached_#{plural_name}"] ||= "#{root}/#{path}"endendprivate_class_method :index@@ -52,7 +52,9 @@ module APIprivate_class_method :showdef self.create_form(name)- define_singleton_method(:"create_#{name}_form") { build_path(name, "form") }+ define_singleton_method(:"create_#{name}_form") do+ RequestStore.store[:"cached_create_#{name}_form"] ||= build_path(name, "form")+ endendprivate_class_method :create_form@@ -62,7 +64,9 @@ module APIprivate_class_method :update_formdef self.schema(name)- define_singleton_method(:"#{name}_schema") { build_path(name, "schema") }+ define_singleton_method(:"#{name}_schema") do+ RequestStore.store[:"cached_#{name}_schema"] ||= build_path(name, "schema")+ endendprivate_class_method :schema@@ -89,7 +93,7 @@ module APIenddef self.root- "#{root_path}api/v3"+ RequestStore.store[:cached_root] ||= "#{root_path}api/v3"enddef self.same_origin?(url)