diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2012-12-14 13:15:57 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2012-12-14 13:22:36 +0000 |
commit | 01d3a36bfe5d56d85f8a36f2fe10ad96662b4530 (patch) | |
tree | 217d1c5719c834a30e59975bc1ef53bead2bc9ad /actionpack/lib/action_dispatch | |
parent | a16da3f25f068119679792e4c64a7eac7bfe911a (diff) | |
download | rails-01d3a36bfe5d56d85f8a36f2fe10ad96662b4530.tar.gz rails-01d3a36bfe5d56d85f8a36f2fe10ad96662b4530.tar.bz2 rails-01d3a36bfe5d56d85f8a36f2fe10ad96662b4530.zip |
Clear url helper methods when routes are reloaded
Remove all the old url helper methods when clear! is called on the
route set because it's possible that some routes have been removed.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 61071d1228..c11e66d110 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -130,6 +130,12 @@ module ActionDispatch end def clear! + @helpers.each do |helper| + @module.module_eval do + remove_possible_method helper + end + end + @routes.clear @helpers.clear end |