Source: show | on GitHub
# File railties/lib/rails/application/routes_reloader.rb, line 14 def initialize(file_watcher: ActiveSupport::FileUpdateChecker) @paths = [] @route_sets = [] @external_routes = [] @eager_load = false @loaded = false @file_watcher = file_watcher end
# File railties/lib/rails/application/routes_reloader.rb, line 32 def execute @loaded = true updater.execute end
# File railties/lib/rails/application/routes_reloader.rb, line 37 def execute_unless_loaded unless @loaded execute ActiveSupport.run_load_hooks(:after_routes_loaded, Rails.application) true end end
# File railties/lib/rails/application/routes_reloader.rb, line 23 def reload! clear! load_paths finalize! route_sets.each(&:eager_load!) if eager_load ensure revert end