Replies: 1 comment 1 reply
-
For the Roda and Sinatra integrations, the If you are using Roda, you can consider using the forme_erubi_capture_block plugin, which supports erubi's capture_block engine, so you can do (note the use of
For Sinatra, there isn't such an integration, though I wouldn't be opposed to including such support if it was submitted in a pull request. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to use forme to do mostly assist with my template generation, with erb and sinatra, but not necessarily completely replace it. For simplicity, I want to create a forme as well as easily mix some display tags in where appropriate. I've looked at the demosite, and I see that the examples look like this:
What I'm not clear about is how the
<form></form>
tags are added to the erb template. Is there some erb magic going on here? Where does the form's to_s get inserted? When I do similar things in sinatra, the form before/after and form tags aren't outputted, which makes sense to me given you haven't output anything from the form. And rightly so, if you do this:you'd see the labels twice, as they're both outputted when they're included in erb template, as well as added to the form's to_s, but the extra tags are not added, so I'd expect to see
<input><input><form><input><hr><input></form>
I can work around this by always doing everything explicitly, and doing something special to generate the form tags, and use the before and after. I just feel like I'm missing something between the way form handles the block.
Beta Was this translation helpful? Give feedback.
All reactions