instance method
add_plugin_load_paths
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
add_plugin_load_paths()
Adds the load paths for every plugin into the $LOAD_PATH. Plugin load paths are added after the application’s lib directory, to ensure that an application can always override code within a plugin.
Plugin load paths are also added to Dependencies.autoload_paths, and Dependencies.autoload_once_paths.
Source
# File railties/lib/rails/plugin/loader.rb, line 52
def add_plugin_load_paths
plugins.each do |plugin|
plugin.load_paths.each do |path|
$LOAD_PATH.insert(application_lib_index + 1, path)
ActiveSupport::Dependencies.autoload_paths << path
unless configuration.reload_plugins?
ActiveSupport::Dependencies.autoload_once_paths << path
end
end
end
$LOAD_PATH.uniq!
end
Defined in railties/lib/rails/plugin/loader.rb line 52
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Plugin::Loader