Initializer skips prepare_dispatcher if Action Controller isn't in use. [#721 state:resolved]

This commit is contained in:
José Valim 2008-07-30 01:41:51 -07:00 committed by Jeremy Kemper
parent a065b764e5
commit c8e80f6389
1 changed files with 1 additions and 0 deletions

View File

@ -523,6 +523,7 @@ Run `rake gems:install` to install the missing gems.
end
def prepare_dispatcher
return unless configuration.frameworks.include?(:action_controller)
require 'dispatcher' unless defined?(::Dispatcher)
Dispatcher.define_dispatcher_callbacks(configuration.cache_classes)
Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch