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

make models registry method private

Ivan Kuchin8be0804647c7
diff --git a/lib_static/open_project/acts/registry_methods.rb b/lib_static/open_project/acts/registry_methods.rb
index 75ed470ecd9..2e7ffabd2c3 100644
--- a/lib_static/open_project/acts/registry_methods.rb
+++ b/lib_static/open_project/acts/registry_methods.rb
@@ -29,10 +29,6 @@
module OpenProject
module Acts
module RegistryMethods
- def models
- @models ||= Set.new
- end
-
def instance(model_name)
models.detect { |cls| cls.name == model_name.singularize.camelize }
end
@@ -49,6 +45,12 @@ module OpenProject
self.models << model
end
end
+
+ private
+
+ def models
+ @models ||= Set.new
+ end
end
end
end