diff options
author | Carl Lerche <carllerche@mac.com> | 2009-05-26 15:03:09 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-05-26 15:03:09 -0700 |
commit | a1f280e83d2b134e23897d4de457d76fb0095768 (patch) | |
tree | fd51ff61395ba4ef39996684dd5b53d2957369fb /actionpack/lib | |
parent | 1358f77745c7a4afab0dab7796aa63072c9d323a (diff) | |
download | rails-a1f280e83d2b134e23897d4de457d76fb0095768.tar.gz rails-a1f280e83d2b134e23897d4de457d76fb0095768.tar.bz2 rails-a1f280e83d2b134e23897d4de457d76fb0095768.zip |
Got all the dispatch tests running on new base
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/new_base/compatibility.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/show_exceptions.rb | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index fddfadcbf2..c09e086b1b 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -61,6 +61,9 @@ module ActionController # and images to a dedicated asset server away from the main web server. Example: # ActionController::Base.asset_host = "http://assets.example.com" cattr_accessor :asset_host + + cattr_accessor :ip_spoofing_check + self.ip_spoofing_check = true end # For old tests diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index 4d598669c7..1bd6a86bec 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -10,7 +10,8 @@ module ActionDispatch @@rescue_responses = Hash.new(:internal_server_error) @@rescue_responses.update({ 'ActionController::RoutingError' => :not_found, - 'ActionController::UnknownAction' => :not_found, + # TODO: Clean this up after the switch + ActionController::UnknownAction.name => :not_found, 'ActiveRecord::RecordNotFound' => :not_found, 'ActiveRecord::StaleObjectError' => :conflict, 'ActiveRecord::RecordInvalid' => :unprocessable_entity, @@ -23,10 +24,10 @@ module ActionDispatch cattr_accessor :rescue_templates @@rescue_templates = Hash.new('diagnostics') @@rescue_templates.update({ - 'ActionView::MissingTemplate' => 'missing_template', - 'ActionController::RoutingError' => 'routing_error', - 'ActionController::UnknownAction' => 'unknown_action', - 'ActionView::TemplateError' => 'template_error' + 'ActionView::MissingTemplate' => 'missing_template', + 'ActionController::RoutingError' => 'routing_error', + ActionController::UnknownAction.name => 'unknown_action', + 'ActionView::TemplateError' => 'template_error' }) FAILSAFE_RESPONSE = [500, {'Content-Type' => 'text/html'}, |