instance method
load_plugins
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
load_plugins()
Loads all plugins in config.plugin_paths. plugin_paths defaults to vendor/plugins but may also be set to a list of paths, such as
config.plugin_paths = ["#{RAILS_ROOT}/lib/plugins", "#{RAILS_ROOT}/vendor/plugins"]
In the default implementation, as each plugin discovered in plugin_paths is initialized:
-
its
libdirectory, if present, is added to the load path (immediately after the applications lib directory) -
init.rbis evaluated, if present
After all plugins are loaded, duplicates are removed from the load path. If an array of plugin names is specified in config.plugins, only those plugins will be loaded and they plugins will be loaded in that order. Otherwise, plugins are loaded in alphabetical order.
if config.plugins ends contains :all then the named plugins will be loaded in the given order and all other plugins will be loaded in alphabetical order
Source
# File railties/lib/initializer.rb, line 368
def load_plugins
plugin_loader.load_plugins
end
Defined in railties/lib/initializer.rb line 368
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Initializer