Methods
Attributes
[R] | route_sets |
Class Public methods
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 6 def initialize super([]) { reload! } @route_sets = [] end
Instance Public methods
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 11 def reload! clear! load_paths finalize! ensure revert end
Instance Protected methods
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 21 def clear! route_sets.each do |routes| routes.disable_clear_and_finalize = true routes.clear! end end
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 32 def finalize! route_sets.each do |routes| ActiveSupport.on_load(:action_controller) { routes.finalize! } end end
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 28 def load_paths paths.each { |path| load(path) } end
Source: show
# File railties/lib/rails/application/routes_reloader.rb, line 38 def revert route_sets.each do |routes| routes.disable_clear_and_finalize = false end end