Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [bdec56cbe74c53482f150829f735e45e9f7afeb7] by Carlos Antonio da Silva

Revision bdec56cbe74c53482f150829f735e45e9f7afeb7, committed by Carlos Antonio da Silva · November 13th, 2010 @ 03:06 PM

Fix rendering partial with layout, when the partial contains another render layout with block call

In such situations, the first layout was not being applied. This fixes it by
storing the block variable before rendering the partial, so the variable
is not overrided, thus the layout is applied (bear in mind the renderer is
shared among all render calls).

This commit also adds some more tests to render partials with layouts and
nested render layout calls.

Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/bdec56cbe74c53482f150829f735e...

5 changed files

  • A actionpack/test/fixtures/test/_partial_with_layout.erb
  • A actionpack/test/fixtures/test/_partial_with_layout_block_content.erb
  • A actionpack/test/fixtures/test/_partial_with_layout_block_partial.erb
  • M actionpack/lib/action_view/render/partials.rb
  • M actionpack/test/template/render_test.rb