instance method
eager_load!
Ruby on Rails 4.0.13
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 461
def eager_load!
config.eager_load_paths.each do |load_path|
matcher = /\A#{Regexp.escape(load_path)}\/(.*)\.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 461
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Engine