diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-16 09:41:05 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-16 10:45:59 +0100 |
commit | 02127e64061fc61868f085102277ac5b679e0f75 (patch) | |
tree | b67ad3bfdebf14dafa2672d04f9b16068dbedcb7 /railties/lib/rails | |
parent | deef8dd68241cdb9826a2293bced5e2257ccea90 (diff) | |
download | rails-02127e64061fc61868f085102277ac5b679e0f75.tar.gz rails-02127e64061fc61868f085102277ac5b679e0f75.tar.bz2 rails-02127e64061fc61868f085102277ac5b679e0f75.zip |
Allow a custom exceptions app to set.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 54612755b4..b20634c5a9 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -244,7 +244,7 @@ module Rails middleware.use ::Rack::MethodOverride middleware.use ::ActionDispatch::RequestId middleware.use ::Rails::Rack::Logger, config.log_tags # must come after Rack::MethodOverride to properly log overridden methods - middleware.use ::ActionDispatch::ShowExceptions, ActionDispatch::PublicExceptions.new(Rails.public_path) + middleware.use ::ActionDispatch::ShowExceptions, config.exceptions_app || ActionDispatch::PublicExceptions.new(Rails.public_path) middleware.use ::ActionDispatch::DebugExceptions middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index dddf7e498f..a782441a21 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -8,7 +8,7 @@ module Rails class Configuration < ::Rails::Engine::Configuration attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, :cache_classes, :cache_store, :consider_all_requests_local, - :dependency_loading, :file_watcher, :filter_parameters, + :dependency_loading, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_tags, :preload_frameworks, :railties_order, :relative_url_root, :reload_plugins, :secret_token, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, @@ -40,6 +40,7 @@ module Rails @relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] @reload_classes_only_on_change = true @file_watcher = ActiveSupport::FileUpdateChecker + @exceptions_app = nil @assets = ActiveSupport::OrderedOptions.new @assets.enabled = false |