This project is archived and is in readonly mode.
form_for silently failing with rails 3.0.0
Reported by Christopher Meiklejohn | August 30th, 2010 @ 04:09 AM
Worked fine as of master around 7:00 PM EST and with 3.1.0.beta off master as well.
Comments and changes to this ticket
-
Christopher Meiklejohn August 30th, 2010 @ 04:09 AM
As far as I can tell, the form is just not appearing. No deprecation warnings in the logs.
-
Christopher Meiklejohn August 30th, 2010 @ 04:12 AM
This is with an explicit require to rails 3.0.0 in the Gemfile. Let me know what other info I can provide.
-
Fred Wu August 30th, 2010 @ 04:20 AM
When using HAML as the template engine, I got the following error:
form_for outputs directly to the Haml template. Disregard its return value and use the - operator, or use capture_haml to get the value as a String.
It worked fine on the old rails 3-0-stable branch, but now it breaks on both 3-0-stable and 3.0.0 release. Master branch is still fine. I haven't gotten time to perform a diagnose yet, so I'm just pasting the error output here for reference.
-
Matthias Schmidt (Wolax) August 30th, 2010 @ 05:02 AM
Same here. Form just doesn't render. No warning, no error, nothing!
-
Matthias Schmidt (Wolax) August 30th, 2010 @ 05:12 AM
Problem occurs as soon as haml is added to the Gemfile.
To reproduce:
new rails project with simple scaffold -> works
add "gem 'haml'" to Gemfile -> form_for fails silently -
Christopher Meiklejohn August 30th, 2010 @ 05:16 AM
Nice wolax. Posted here: http://github.com/nex3/haml/issues/issue/249
Still not sure why master is fine.
-
cdmwebs August 30th, 2010 @ 05:19 AM
Looks like that github issue is a dupe of http://github.com/nex3/haml/issues#issue/248
-
Jeremy Kemper August 30th, 2010 @ 05:36 AM
- State changed from new to duplicate
- Importance changed from to Low
Looks like HAML will need to resolve this.
-
Hugo Peixoto August 30th, 2010 @ 05:40 AM
Found the potential source of the problem.
It seems like a bad case of copy-pasta gone wrong in the haml gem; the form_for method is defined twice, and the latter seems to be outdated.
Removing the latter definition makes everything work again (as far as I can tell) in both erb and haml templates.(Attaching the diff file that fixes it)
-
nex3 August 30th, 2010 @ 05:43 AM
I just got home, and I'm now looking into this. I hope to release Haml 3.0.18 with a fix some time tonight.
-
nex3 August 30th, 2010 @ 06:44 AM
This has been fixed by http://github.com/nex3/haml/commit/61a1de3ff75e98e92688f9dd2d121a3c.... The fix is released as part of Haml 3.0.18.
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>