Skip to Content Skip to Search

class Rails::Application::RoutesReloader

Inherits From

Attributes

[RW] eager_load
[R] external_routes
[R] loaded
[R] paths
[R] route_sets

Public class methods

Source code GitHub
# File railties/lib/rails/application/routes_reloader.rb, line 15
def initialize
  @paths      = []
  @route_sets = []
  @external_routes = []
  @eager_load = false
  @loaded = false
end

Public instance methods

Source code GitHub
# File railties/lib/rails/application/routes_reloader.rb, line 33
def execute_unless_loaded
  unless @loaded
    execute
    ActiveSupport.run_load_hooks(:after_routes_loaded, Rails.application)
    true
  end
end
Source code GitHub
# File railties/lib/rails/application/routes_reloader.rb, line 23
def reload!
  @loaded = true
  clear!
  load_paths
  finalize!
  route_sets.each(&:eager_load!) if eager_load
ensure
  revert
end

Definition files