instance method
set_autoload_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
set_autoload_paths()
Set the paths from which Rails will automatically load source files, and the load_once paths.
Source
# File railties/lib/initializer.rb, line 236
def set_autoload_paths
ActiveSupport::Dependencies.load_paths = configuration.load_paths.uniq
ActiveSupport::Dependencies.load_once_paths = configuration.load_once_paths.uniq
extra = ActiveSupport::Dependencies.load_once_paths - ActiveSupport::Dependencies.load_paths
unless extra.empty?
abort <<-end_error
load_once_paths must be a subset of the load_paths.
Extra items in load_once_paths: #{extra * ','}
end_error
end
# Freeze the arrays so future modifications will fail rather than do nothing mysteriously
configuration.load_once_paths.freeze
end
Defined in railties/lib/initializer.rb line 236
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Initializer