RJS doesn't render with an HTML layout by default

This commit is contained in:
Yehuda Katz + Carl Lerche 2009-06-17 12:36:15 -07:00
parent 4fad953f90
commit 487312515c
2 changed files with 4 additions and 5 deletions

View File

@ -124,6 +124,7 @@ module ActionController
super super
rescue ActionView::MissingTemplate rescue ActionView::MissingTemplate
_find_by_parts(_layout({}), {}) _find_by_parts(_layout({}), {})
nil
end end
def performed? def performed?

View File

@ -375,11 +375,9 @@ class MimeControllerTest < ActionController::TestCase
end end
def test_rjs_type_skips_layout def test_rjs_type_skips_layout
pending(:new_base) do @request.accept = "text/javascript"
@request.accept = "text/javascript" get :all_types_with_layout
get :all_types_with_layout assert_equal 'RJS for all_types_with_layout', @response.body
assert_equal 'RJS for all_types_with_layout', @response.body
end
end end
def test_html_type_with_layout def test_html_type_with_layout