Navigation Menu

Skip to content

Commit

Permalink
Fix case when rendering a partial inside RJS with inherited layout [#…
Browse files Browse the repository at this point in the history
…4786 state:resolved]
  • Loading branch information
josevalim committed Jun 7, 2010
1 parent 50031bf commit 981f812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/lookup_context.rb
Expand Up @@ -188,7 +188,7 @@ def with_layout_format
begin
yield
ensure
_set_detail(:formats, formats)
_set_detail(:formats, old_formats)
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions actionpack/test/controller/new_base/render_rjs_test.rb
Expand Up @@ -2,7 +2,10 @@

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') %>",
Expand Down

0 comments on commit 981f812

Please sign in to comment.