aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/route_set.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-04-17 11:36:08 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-04-17 11:36:08 -0700
commitba12ef6ae15208a608733a06b78940ef92f305b8 (patch)
treea1ef7f50da63068a2d4ff7174a9bc8a6e47e5177 /actionpack/lib/action_dispatch/routing/route_set.rb
parent03d071d3cf9a29708aaceb19f2a7b934a1dec0d1 (diff)
downloadrails-ba12ef6ae15208a608733a06b78940ef92f305b8.tar.gz
rails-ba12ef6ae15208a608733a06b78940ef92f305b8.tar.bz2
rails-ba12ef6ae15208a608733a06b78940ef92f305b8.zip
just clear the caches on clear! rather than replacing. fixes #10251
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index a993699e05..6e63f92ff3 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -97,9 +97,7 @@ module ActionDispatch
@routes = {}
@helpers = []
- @module = Module.new do
- instance_methods.each { |selector| remove_method(selector) }
- end
+ @module = Module.new
end
def helper_names
@@ -108,13 +106,11 @@ module ActionDispatch
def clear!
@helpers.each do |helper|
- @module.module_eval do
- remove_possible_method helper
- end
+ @module.remove_possible_method helper
end
- @routes = {}
- @helpers = []
+ @routes.clear
+ @helpers.clear
end
def add(name, route)