Set the paths from which Rails will automatically load source files, and the load_once paths.
Source Code
# File initializer.rb, line 120 def set_autoload_paths Dependencies.load_paths = configuration.load_paths.uniq Dependencies.load_once_paths = configuration.load_once_paths.uniq extra = Dependencies.load_once_paths - Dependencies.load_paths unless extra.empty? abort "load_once_paths must be a subset of the load_paths.\nExtra items in load_once_paths: \#{extra * ','}\n" end # Freeze the arrays so future modifications will fail rather than do nothing mysteriously configuration.load_once_paths.freeze end
<code/>and<pre/>for code samples.