Accessing loaded_plugins from initializer?

Hey guys,

Isn't it possible to access Rails::Initializer after it ran?

For instance, I want to see which plugins were loaded but I can't do
Dir["#{RAILS_ROOT}/plugins/*"] because I'm using another plugin
loader.

What's the "official" way the framework is using to get data from the
Initializer? Make it call your model?

Thanks,
Pedro

Hey Pedro,

I don’t think there is. There is just accessor for Rails::Configuration. But you could easily get it:

RINIT = Rails::Initializer.run do |config|

end

Now open up script/console:

RINIT.loaded_plugins.map &:name

I think if we save the Configuration instance, we could save Initializer as well.