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:
parent
50031bf932
commit
981f81275b
2 changed files with 4 additions and 1 deletions
|
@ -188,7 +188,7 @@ module ActionView
|
|||
begin
|
||||
yield
|
||||
ensure
|
||||
_set_detail(:formats, formats)
|
||||
_set_detail(:formats, old_formats)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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') %>",
|
||||
|
|
Loading…
Reference in a new issue