Plugins - loaded_plugins
Add to favoritesloaded_plugins
loaded_plugins adds +Rails.plugins+, a list all of the plugins that Rails has loaded.
Resources
Announcement
Wiki
API
Development
Source
Description
During initialization, +Rails.plugins+ will keep track of a list of all of the plugins that have been loaded so far. Once initialization is complete, +Rails.plugins+ will contain all of the plugins loaded in the application.
The order of the plugins will be based on the order in which the plugins were loaded during initialization.
Usage
If you need access to Rails.plugins during initialization of your application, you must use one of two things:
- Use +config.plugins+ to specify the order in which plugins are
loaded, for example:
Rails::Initializer.run do |config|
...
config.plugins = [
'loaded_plugins',
...
]
end
- Require the plugin with the plugin_dependencies[http://wiki.pluginaweek.org/Plugin_dependencies] plugin installed.
If using require without plugin_dependencies installed, loaded_plugins will not track all of the plugins that were loaded prior to it being loaded until after initialization is complete.
Also, note that the plugins are listed in the order that they are completely loaded. That is, only after the entire initialization of a plugin is complete will it get added to +Rails.plugins+.
References
- James Adam - Engines[http://www.rails-engines.org]
http://wiki.pluginaweek.org/Loaded_plugins
http://svn.pluginaweek.org/trunk/plugins/rails/loaded_plugins
Rails' (MIT)
Misc. Enhancements

So much work for something built-in (in edge). Take a look at Rails::Initializer.loaded_plugins