aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/lookup_context.rb2
-rw-r--r--actionpack/test/controller/new_base/render_rjs_test.rb3
2 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb
index 3aaa5e401c..823226cb9c 100644
--- a/actionpack/lib/action_view/lookup_context.rb
+++ b/actionpack/lib/action_view/lookup_context.rb
@@ -188,7 +188,7 @@ module ActionView
begin
yield
ensure
- _set_detail(:formats, formats)
+ _set_detail(:formats, old_formats)
end
end
end
diff --git a/actionpack/test/controller/new_base/render_rjs_test.rb b/actionpack/test/controller/new_base/render_rjs_test.rb
index b602b9f8e9..74bf865b54 100644
--- a/actionpack/test/controller/new_base/render_rjs_test.rb
+++ b/actionpack/test/controller/new_base/render_rjs_test.rb
@@ -2,7 +2,10 @@ require 'abstract_unit'
module RenderRjs
class BasicController < ActionController::Base
+ layout "application", :only => :index_respond_to
+
self.view_paths = [ActionView::FixtureResolver.new(
+ "layouts/application.html.erb" => "",
"render_rjs/basic/index.js.rjs" => "page[:customer].replace_html render(:partial => 'customer')",
"render_rjs/basic/index_html.js.rjs" => "page[:customer].replace_html :partial => 'customer'",
"render_rjs/basic/index_no_js.js.erb" => "<%= render(:partial => 'developer') %>",