diff options
author | Sam Stephenson <sam@37signals.com> | 2005-11-08 04:26:34 +0000 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2005-11-08 04:26:34 +0000 |
commit | b661c9603a3d053f940e50fc1b63ff568f9b98f8 (patch) | |
tree | 4bd99f03f1642c5be34b8c553bb2f56df68bac22 /railties/builtin/controllers | |
parent | c9ae41fe5154224a047efb4c8fccac4549755a0c (diff) | |
download | rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.tar.gz rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.tar.bz2 rails-b661c9603a3d053f940e50fc1b63ff568f9b98f8.zip |
Added an omnipresent RailsInfoController with a properties action that delivers an HTML rendering of Rails::Info (but only when local_request? is true). Added a new default index.html which fetches this with Ajax.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/builtin/controllers')
-rw-r--r-- | railties/builtin/controllers/rails_info_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/builtin/controllers/rails_info_controller.rb b/railties/builtin/controllers/rails_info_controller.rb new file mode 100644 index 0000000000..ca2801e075 --- /dev/null +++ b/railties/builtin/controllers/rails_info_controller.rb @@ -0,0 +1,11 @@ +module Controllers #:nodoc: + class RailsInfoController < ApplicationController + def properties + if 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 + end + end + end +end
\ No newline at end of file |