diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-06 12:11:38 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-06 12:11:38 +0100 |
commit | c954d54e2f36bb53ced5e3655adc071dd233797e (patch) | |
tree | d84bf4bf51f65a1c817089c6fe37c3e9f20420d0 /railties/lib/rails/application/routes_reloader.rb | |
parent | f2b41914d6be935182d37e0c0d491352ac3de043 (diff) | |
parent | d40ca9cce241a8083756c993d6c99a79e62e050e (diff) | |
download | rails-c954d54e2f36bb53ced5e3655adc071dd233797e.tar.gz rails-c954d54e2f36bb53ced5e3655adc071dd233797e.tar.bz2 rails-c954d54e2f36bb53ced5e3655adc071dd233797e.zip |
Merge branch 'master' into nested_has_many_through
Diffstat (limited to 'railties/lib/rails/application/routes_reloader.rb')
-rw-r--r-- | railties/lib/rails/application/routes_reloader.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 23b72a0ec6..6da903c1ac 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -8,7 +8,7 @@ module Rails def blocks @blocks ||= {} end - private + def reload! clear! load_blocks @@ -18,6 +18,8 @@ module Rails revert end + protected + def clear! routers.each do |routes| routes.disable_clear_and_finalize = true @@ -32,7 +34,7 @@ module Rails end def load_paths - paths.each { |path| load(path) } + paths.each { |path| load(path) } end def finalize! |