cells icon indicating copy to clipboard operation
cells copied to clipboard

form_tag and submit_tag broken with Hamlit

Open Xanthus opened this issue 9 years ago • 4 comments

I'm not sure if this is Cells and/or Hamlit, but using a bare Rails 4.2.6 app on Ruby 2.2.3, rendering a simple form tag and submit tag is broken with Hamlit:

=form_tag '/' do
  = submit_tag 'Save'

I get:

With cells-hamlit (0.2.0):

<input type="submit" name="commit" value="Save" />
<form action="/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="ocWFwYCM9qLZ8qqC7MOuHw98xje0g1ROcGu+7qi706YZ5C9FkqDhPA679r5CpOGTc9fUykUevBzTs+xUPOZ5hw==" />["<input type=\"submit\" name=\"commit\" value=\"Save\" />", "\n"]</form>

With cells-haml (0.0.10) and the haml ref from the readme:

<form action="/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="Ozbug08sSSPi6CNZ0tZOMCFEC11/Wu5E2lrSwVYRXsaDF0QHXQBevTWhf2V8sQG8Xe8ZoI7HBhZ5goB7wkz05w==" />
  <input type="submit" name="commit" value="Save" />
</form>

Xanthus avatar Jun 25 '16 15:06 Xanthus

Have you tried installing hamlit-block ?

2016-06-25 16:48 GMT+01:00 Nick Yatracos [email protected]:

I'm not sure if this is Cells and/or Hamlit, but using a bare Rails 4.2.6 app on Ruby 2.2.3, rendering a simple form tag and submit tag is broken with Hamlit:

=form_tag '/' do = submit_tag 'Save'

I get:

With cells-hamlit (0.2.0):

["", "\n"]

With cells-haml (0.0.10) and the haml ref from the readme:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apotonick/cells/issues/419, or mute the thread https://github.com/notifications/unsubscribe/AJfZU51gmFnXebv-AOT71-ZZ9e-3Pg2qks5qPU3egaJpZM4I-Xwo .

samstickland avatar Jun 25 '16 19:06 samstickland

It's the same problem described on https://github.com/hamlit/hamlit-block/issues/1

Titinux avatar Jun 26 '16 07:06 Titinux

I see. @samstickland installing hamlit-block has the side effect you mentioned in https://github.com/hamlit/hamlit-block/issues/1 where blocks no longer have any output so my other templates break.

Xanthus avatar Jun 26 '16 13:06 Xanthus

Yeah @apotonick or the hamlit author might have something to add about this. I've since swapped hamlit for slim.

Sam El 26 jun. 2016 2:54 PM, "Nick Yatracos" [email protected] escribió:

I see. @samstickland https://github.com/samstickland installing hamlit-block has the side effect you mentioned in hamlit/hamlit-block#1 https://github.com/hamlit/hamlit-block/issues/1 where blocks no longer have any output so my other templates break.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apotonick/cells/issues/419#issuecomment-228602503, or mute the thread https://github.com/notifications/unsubscribe/AJfZU65EDUkeawE6rvn4hKW3QG8cJizZks5qPoR2gaJpZM4I-Xwo .

samstickland avatar Jun 26 '16 14:06 samstickland