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.

[PATCH] Rails 3 prototype_helper causes exception when content_tags are nested within blocks

#4139

Note: This is in Rails 3
The prototype_helper initializes a JavaScriptGenerator and passes in an empty array to with_output_buffer.
If a content_tag is passed into another content tag via a block, the output_buffer is set to an empty array, which then tries to call 'encoding' on it and fails.

I've attached a failing test, and a patch to make the test pass.

Reported by Denis Odorcic · March 10th, 2010 @ 07:31 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Denis Odorcic
    Denis Odorcic
    • Title changed from with_output_buffer to [PATCH] Rails 3 prototype_helper causes exception when content_tags are nested within blocks

    March 10th, 2010 @ 07:37 AM

  2. Denis Odorcic
    Denis Odorcic

    Fixed last night by commit 4464b8e it seems.

    March 11th, 2010 @ 02:39 AM

  3. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to resolved

    March 11th, 2010 @ 08:33 AM