instance method
add_plugin_load_paths
Ruby on Rails 2.2.3
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.load_paths, and Dependencies.load_once_paths.
Source
# File railties/lib/rails/plugin/loader.rb, line 44
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.load_paths << path
unless Rails.configuration.reload_plugins?
ActiveSupport::Dependencies.load_once_paths << path
end
end
end
$LOAD_PATH.uniq!
end
Defined in railties/lib/rails/plugin/loader.rb line 44
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Plugin::Loader