diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/info_controller.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/templates/rails/welcome/index.html.erb | 5 |
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' |