formular
formular copied to clipboard
When using HAML formular render twice
I forked the exemple project et migrated templates to haml to show the problem (only with one field)
https://github.com/elbouillon/gemgem-sinatra
What HAML version are you using? There's a bug with several versions!!!
I'm using Hamlit, in the example I did it's version 2.8.6 https://github.com/elbouillon/gemgem-sinatra/blob/ff2bec03e22fae7fad33d8b6262be1c349a45685/Gemfile.lock#L44
@fran-worley Any ideas?
Do you want a screenshot?
Le mar. 2 janv. 2018 à 16:07, Nick Sutterer [email protected] a écrit :
@fran-worley https://github.com/fran-worley Any ideas?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trailblazer/formular/issues/52#issuecomment-354786269, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC-0uTaxSHK3bHRmByGVjlKdoR1k3knks5tGkY-gaJpZM4RQFXh .
@elbouillon @apotonick Probably because it's not actually tested against haml... I would think it is probably related to #3
What I remember was that it render everything twice "fom" tag included
Hi there, I am having the same error with hamlit (2.8.8).
Is there some quick fix at the moment? Some version I can downgrade to, so that I can get around it?
I have looked into #3 but patching Formular::Builder#call
does not seem to help.
Maybe I misunderstood?
EDIT: It seems to be a problem of combination of gems. I tried to fallback to SimpleForm, but had the same behavior as with Formular. After replacing cells-hamlit
with cells-haml
the form is not rendered twice anymore. When I tried to use Formular
the form was rendered twice again (despite using cells-haml
), but the output did not contain Ruby array artifacts (e.g. "[", "]" and commas).
- SimpleForm + Cells-hamlit ⇒ Rendering form twice, with Ruby array artifacts
- SimpleForm + Cells-haml ⇒ Rendering correctly
- Formular + Cells-haml ⇒ Rendering form twice, without Ruby array artifacts
yeah, you can switch to slim 🤔
On Tue, May 15, 2018 at 9:36 AM, Arthur Leonard Andersen < [email protected]> wrote:
Hi there, I am having the same error with hamlit (2.8.8).
Is there some quick fix at the moment? Some version I can downgrade to, so that I can get around it?
I have looked into #3 https://github.com/trailblazer/formular/issues/3 but patching Formular::Builder#call does not seem to help. Maybe I misunderstood?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/trailblazer/formular/issues/52#issuecomment-389072827, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC-0hHsgU1HY-O0FNn02zxje00fiUjEks5tyoWGgaJpZM4RQFXh .
@elbouillon Mickael & @leoc Arthur -> see issue #63 for a workaround if you are still looking for HAML option. @apotonick - your insight would be appreciated (what the best way to implement this #63 more comprehensively).