diff --git a/config/application.rb b/config/application.rb index c10fb0bae18..6092fb03ce2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -114,13 +114,6 @@ class Application < Rails::Application # on the top to bottom order of initializer calls in the file. # Because this is easy to mess up, keep your initializers in order. # register plugins even before loading settings, as plugins can bring their own settings - initializer :register_vmdb_plugins, :before => :load_vmdb_settings do - Rails.application.railties.each do |railtie| - next unless railtie.class.name.start_with?("ManageIQ::Providers::") || railtie.try(:vmdb_plugin?) - Vmdb::Plugins.instance.register_vmdb_plugin(railtie) - end - end - initializer :load_vmdb_settings, :before => :load_config_initializers do Vmdb::Settings.init Vmdb::Loggers.apply_config(::Settings.log) diff --git a/lib/vmdb/plugins.rb b/lib/vmdb/plugins.rb index 79658d3cd6e..74e1746ef44 100644 --- a/lib/vmdb/plugins.rb +++ b/lib/vmdb/plugins.rb @@ -8,6 +8,11 @@ class Plugins def initialize @registered_automate_domains = [] @vmdb_plugins = [] + + Rails.application.railties.each do |railtie| + next unless railtie.class.name.start_with?("ManageIQ::Providers::") || railtie.try(:vmdb_plugin?) + register_vmdb_plugin(railtie) + end end def register_vmdb_plugin(engine)