2010-01-17 06:41:55 -05:00
|
|
|
require "action_dispatch"
|
|
|
|
require "rails"
|
|
|
|
|
|
|
|
module ActionDispatch
|
|
|
|
class Railtie < Rails::Railtie
|
2010-03-26 13:47:55 -04:00
|
|
|
config.action_dispatch = ActiveSupport::OrderedOptions.new
|
2010-03-26 19:58:55 -04:00
|
|
|
config.action_dispatch.x_sendfile_header = ""
|
2010-03-03 19:22:30 -05:00
|
|
|
config.action_dispatch.ip_spoofing_check = true
|
2010-02-23 20:03:06 -05:00
|
|
|
|
2010-01-17 06:41:55 -05:00
|
|
|
# Prepare dispatcher callbacks and run 'prepare' callbacks
|
|
|
|
initializer "action_dispatch.prepare_dispatcher" do |app|
|
|
|
|
# TODO: This used to say unless defined?(Dispatcher). Find out why and fix.
|
|
|
|
require 'rails/dispatcher'
|
2010-01-23 09:05:13 -05:00
|
|
|
ActionDispatch::Callbacks.to_prepare { app.routes_reloader.reload_if_changed }
|
2010-01-17 06:41:55 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|