diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-12 18:41:26 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-12 18:41:26 -0600 |
commit | 018dafe574d370165547516ffef43394e11ab4da (patch) | |
tree | 6ad2359b8f00dabee5e1fd46bebb59fc72530f36 /actionpack/lib/action_dispatch.rb | |
parent | ee395fe626760e897abd9e881b54d3cc3f407d31 (diff) | |
download | rails-018dafe574d370165547516ffef43394e11ab4da.tar.gz rails-018dafe574d370165547516ffef43394e11ab4da.tar.bz2 rails-018dafe574d370165547516ffef43394e11ab4da.zip |
Allow autoloads to opt out of eager loading
Diffstat (limited to 'actionpack/lib/action_dispatch.rb')
-rw-r--r-- | actionpack/lib/action_dispatch.rb | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/actionpack/lib/action_dispatch.rb b/actionpack/lib/action_dispatch.rb index e21dbc59cc..d1c191d652 100644 --- a/actionpack/lib/action_dispatch.rb +++ b/actionpack/lib/action_dispatch.rb @@ -30,38 +30,47 @@ end module ActionDispatch extend ActiveSupport::Autoload - autoload_under "http" do + autoload_under 'http' do autoload :Request autoload :Response autoload :StatusCodes autoload :Utils end - autoload_under "middleware" do - autoload :Callbacks - autoload :ParamsParser - autoload :Rescue - autoload :ShowExceptions - autoload :Static - autoload :StringCoercion - end + deferrable do + autoload_under 'middleware' do + autoload :Callbacks + autoload :ParamsParser + autoload :Rescue + autoload :ShowExceptions + autoload :Static + autoload :StringCoercion + end - autoload :MiddlewareStack, 'action_dispatch/middleware/stack' - autoload :Routing + autoload :MiddlewareStack, 'action_dispatch/middleware/stack' + autoload :Routing - autoload :HTML, 'action_controller/vendor/html-scanner' + module Http + autoload :Headers, 'action_dispatch/http/headers' + end - module Http - extend ActiveSupport::Autoload + module Session + autoload :AbstractStore, 'action_dispatch/middleware/session/abstract_store' + autoload :CookieStore, 'action_dispatch/middleware/session/cookie_store' + autoload :MemCacheStore, 'action_dispatch/middleware/session/mem_cache_store' + end - autoload :Headers + autoload_under 'testing' do + autoload :Assertions + autoload :Integration + autoload :PerformanceTest + autoload :TestProcess + autoload :TestRequest + autoload :TestResponse + end end - module Session - autoload :AbstractStore, 'action_dispatch/middleware/session/abstract_store' - autoload :CookieStore, 'action_dispatch/middleware/session/cookie_store' - autoload :MemCacheStore, 'action_dispatch/middleware/session/mem_cache_store' - end + autoload :HTML, 'action_controller/vendor/html-scanner' end autoload :Mime, 'action_dispatch/http/mime_type' |