diff options
author | Manfred Stienstra <manfred@fngtps.com> | 2009-04-07 09:16:48 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-07 09:16:48 -0500 |
commit | f209d3898fbd866e1405861319b85c97674a0508 (patch) | |
tree | f3ed665dadbd37693f46ce1a5d0f98b8400280b6 /railties/builtin/rails_info | |
parent | 660fc93942697b74a8093d4d5338d1ced25cbe7f (diff) | |
download | rails-f209d3898fbd866e1405861319b85c97674a0508.tar.gz rails-f209d3898fbd866e1405861319b85c97674a0508.tar.bz2 rails-f209d3898fbd866e1405861319b85c97674a0508.zip |
Improve tests and code for Rails::InfoController and Rails::Info [#2411 state:resolved]
- Refactor Rails::InfoController tests.
- Return forbidden status from the InfoController for remote requests instead of a 500.
- Add tests for displaying middleware in Rails::Info.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'railties/builtin/rails_info')
-rw-r--r-- | railties/builtin/rails_info/rails/info_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/builtin/rails_info/rails/info_controller.rb b/railties/builtin/rails_info/rails/info_controller.rb index 05745d606d..47e87c5bf5 100644 --- a/railties/builtin/rails_info/rails/info_controller.rb +++ b/railties/builtin/rails_info/rails/info_controller.rb @@ -3,7 +3,7 @@ class Rails::InfoController < ActionController::Base if consider_all_requests_local || local_request? render :inline => Rails::Info.to_html else - render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => 500 + render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden end end end |