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.

form_for blocks are skipped in ActionView due to changes in OutputBuffer

#4160

Today I updated my local rails 3 to master.

I encountered a problem with form_for block rendering. First I guessed it has something to do with Haml, so i converted a view to erb to check it. The form was not rendered - it was skipped entirely. Other blocks work fine even in Haml 2.3.0. Content before and after the form_for block is rendered properly.

I guess this problem is related to the recent changes in ActionView::OutputBuffer by Jose Valim. See: http://github.com/rails/rails/commit/4840acd485a4a6bcdd73338447af7e...

Someone in #rails-contrib has confirmed this behaviour.

Reported by Gregor Robert Russbuelt · March 12th, 2010 @ 01:05 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. beawesomeinstead
  2. beawesomeinstead
    beawesomeinstead
    • Assigned user set to José Valim

    March 12th, 2010 @ 01:21 PM

  3. José Valim
    José Valim
    • State changed from new to wontfix

    This is the new behavior. You have to change: "<% form_for(@user) do %>" to "<%= form_for(@user) %>" which is how it's supposed to be in the first place. Deprecation warnings are coming soon.

    March 12th, 2010 @ 01:23 PM

  4. Gregor Robert Russbuelt
    Gregor Robert Russbuelt

    It does not even work with "<%= form_for(@user) do %>".

    March 12th, 2010 @ 01:28 PM

  5. Jeroen van Dijk
    Jeroen van Dijk
    • Assigned user cleared.

    I have prepared a patch to update the documentation for this change. Please see #4161

    March 12th, 2010 @ 01:39 PM