1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix case when rendering a partial inside RJS with inherited layout [#4786 state:resolved]

This commit is contained in:
José Valim 2010-06-07 22:22:54 +02:00
parent 50031bf932
commit 981f81275b
2 changed files with 4 additions and 1 deletions

View file

@ -188,7 +188,7 @@ module ActionView
begin
yield
ensure
_set_detail(:formats, formats)
_set_detail(:formats, old_formats)
end
end
end

View file

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