Method: ActionDispatch::Routing::RouteSet::NamedRouteCollection#clear!

Defined in:
actionpack/lib/action_dispatch/routing/route_set.rb

#clear!Object Also known as: clear



106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 106

def clear!
  @path_helpers.each do |helper|
    @path_helpers_module.remove_method helper
  end

  @url_helpers.each do |helper|
    @url_helpers_module.remove_method helper
  end

  @routes.clear
  @path_helpers.clear
  @url_helpers.clear
end