method
eager_load!
v6.1.3.1 -
Show latest stable
-
0 notes -
Class: Rails::Engine
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (-38)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
eager_load!()
public
Hide source
# File railties/lib/rails/engine.rb, line 484 def eager_load! # Already done by Zeitwerk::Loader.eager_load_all. We need this guard to # easily provide a compatible API for both zeitwerk and classic modes. return if Rails.autoloaders.zeitwerk_enabled? config.eager_load_paths.each do |load_path| # Starts after load_path plus a slash, ends before ".rb". relname_range = (load_path.to_s.length + 1)...-3 Dir.glob("#{load_path}/**/*.rb").sort.each do |file| require_dependency file[relname_range] end end end