aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-05 04:07:09 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-05 04:07:09 -0800
commit1e1c7afe3fed844e1a11a75e125a0ac7af1d468b (patch)
tree128d5be04d4de9f1a6d43534869f71fa8ac4d6e0 /railties
parenta8637c8f289717e44d08d8a47ed2a1ff8afcee9c (diff)
parenteb34327ab5983d7a9c10c74d851fa02ebc905c07 (diff)
downloadrails-1e1c7afe3fed844e1a11a75e125a0ac7af1d468b.tar.gz
rails-1e1c7afe3fed844e1a11a75e125a0ac7af1d468b.tar.bz2
rails-1e1c7afe3fed844e1a11a75e125a0ac7af1d468b.zip
Merge pull request #8737 from tricknotes/info-page-style
Fix info page style [ci skip]
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/info_controller.rb2
-rw-r--r--railties/lib/rails/templates/rails/welcome/index.html.erb5
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails/info_controller.rb b/railties/lib/rails/info_controller.rb
index e650f58d20..0b71b0d274 100644
--- a/railties/lib/rails/info_controller.rb
+++ b/railties/lib/rails/info_controller.rb
@@ -3,7 +3,7 @@ require 'action_dispatch/routing/inspector'
class Rails::InfoController < ActionController::Base # :nodoc:
self.view_paths = File.expand_path('../templates', __FILE__)
prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
- layout 'application'
+ layout -> { request.xhr? ? nil : 'application' }
before_filter :require_local!
diff --git a/railties/lib/rails/templates/rails/welcome/index.html.erb b/railties/lib/rails/templates/rails/welcome/index.html.erb
index 4dee366a76..8ddec1b2a3 100644
--- a/railties/lib/rails/templates/rails/welcome/index.html.erb
+++ b/railties/lib/rails/templates/rails/welcome/index.html.erb
@@ -174,8 +174,9 @@
<script>
function about() {
var info = document.getElementById('about-content'),
- xhr = new XMLHttpRequest();
- xhr.open("GET","rails/info/properties",false);
+ xhr = new XMLHttpRequest();
+ xhr.open("GET", "rails/info/properties", false);
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.send("");
info.innerHTML = xhr.responseText;
info.style.display = 'block'