instance method
eager_load!
Ruby on Rails 5.2.8.1
Since v3.0.20Signature
eager_load!()
Eager load the application by loading all ruby files inside eager_load paths.
Source
# File railties/lib/rails/engine.rb, line 474
def eager_load!
config.eager_load_paths.each do |load_path|
matcher = /\A#{Regexp.escape(load_path.to_s)}\/(.*)\.rb\Z/
Dir.glob("#{load_path}/**/*.rb").sort.each do |file|
require_dependency file.sub(matcher, '\1')
end
end
end
Defined in railties/lib/rails/engine.rb line 474
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Engine