This project is archived and is in readonly mode.
form_for silently failing with rails 3.0.0
-
Christopher Meiklejohn
As far as I can tell, the form is just not appearing. No deprecation warnings in the logs.
-
Christopher Meiklejohn
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
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)
Same here. Form just doesn't render. No warning, no error, nothing!
-
Matthias Schmidt (Wolax)
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
Confirmed.
-
Christopher Meiklejohn
Nice wolax. Posted here: http://github.com/nex3/haml/issues/issue/249
Still not sure why master is fine.
-
cdmwebs
Looks like that github issue is a dupe of http://github.com/nex3/haml/issues#issue/248
-
Hugo Peixoto
Confirmed Wolax's described behaviour
-
Jeremy Kemper
- State changed from new to duplicate
- Importance changed from to Low
Looks like HAML will need to resolve this.
-
Hugo Peixoto
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
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
This has been fixed by http://github.com/nex3/haml/commit/61a1de3ff75e98e92688f9dd2d121a3c.... The fix is released as part of Haml 3.0.18.