Skip to content
Discussion options

You must be logged in to vote

I'd recommend using preview templates here. If you still wish to use a preview defined in the current way, one thing to note is that the return value of form_with is probably rendered output as opposed to the form helper object you want. So maybe this will work:

form_with(model: Post.new) do |f|
  name = :title
  render(BulmaInputComponent.new(f, name))
end

This is just speculation, though, so I'd recommend preview templates. With the solution above, I would recommend using the fields form helper to avoid having a wrapper form tag.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joelhawksley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants