This project is archived and is in readonly mode.
form_for blocks are skipped in ActionView due to changes in OutputBuffer
Reported by Gregor Robert Russbuelt | March 12th, 2010 @ 01:05 PM
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.
Comments and changes to this ticket
-
beawesomeinstead March 12th, 2010 @ 01:21 PM
- Assigned user set to José Valim
-
José Valim March 12th, 2010 @ 01:23 PM
- 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.
-
Gregor Robert Russbuelt March 12th, 2010 @ 01:28 PM
It does not even work with "<%= form_for(@user) do %>".
-
Jeroen van Dijk March 12th, 2010 @ 01:39 PM
- Assigned user cleared.
I have prepared a patch to update the documentation for this change. Please see #4161
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>