From 5e253aed7d07bfafaaac3c53a4891a98921dcbd4 Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Thu, 30 Sep 2021 04:27:26 +0000 Subject: [PATCH 4/8] Remove require_dependency --- app/models/enumeration.rb | 4 ---- app/models/group.rb | 1 - app/models/group_builtin.rb | 2 -- app/models/principal.rb | 2 -- lib/redmine/twofa.rb | 2 +- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index 53360e5ff8..6e1c336851 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -175,7 +175,3 @@ class Enumeration < ActiveRecord::Base end end -# Force load the subclasses in development mode -require_dependency 'time_entry_activity' -require_dependency 'document_category' -require_dependency 'issue_priority' diff --git a/app/models/group.rb b/app/models/group.rb index a676816ecf..861210d161 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -128,4 +128,3 @@ class Group < Principal end end -require_dependency "group_builtin" diff --git a/app/models/group_builtin.rb b/app/models/group_builtin.rb index 0c29d50da6..ce77f72743 100644 --- a/app/models/group_builtin.rb +++ b/app/models/group_builtin.rb @@ -57,5 +57,3 @@ class GroupBuiltin < Group end end -require_dependency "group_anonymous" -require_dependency "group_non_member" diff --git a/app/models/principal.rb b/app/models/principal.rb index 009d2ab834..a6a4a5c3e3 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -218,5 +218,3 @@ class Principal < ActiveRecord::Base end end -require_dependency "user" -require_dependency "group" diff --git a/lib/redmine/twofa.rb b/lib/redmine/twofa.rb index 612cdec992..cfa0ea422e 100644 --- a/lib/redmine/twofa.rb +++ b/lib/redmine/twofa.rb @@ -55,7 +55,7 @@ module Redmine def self.scan_builtin_schemes Dir[Rails.root.join('lib', 'redmine', 'twofa', '*.rb')].each do |file| - require_dependency file + require file end end private_class_method :scan_builtin_schemes -- 2.11.0