Open Yasingthb opened 4 months ago
@Yasingthb it appears that Phlex immediately renders the html to the current context, where rails methods normally returns a string instead. So link_to(*args)
in Phlex is equivalent to concat(link_to(*args))
in rails.
Thank you
Thanks for responding, @av-martin . @Yasingthb does this resolve your issue? It seems Phlex works in a way that isn't really compatible with how Rails and bootstrap_form
work.
The following code snippet provided in the documentation is not functioning as expected when used with Phlex framework:
f.email_field(:email, append: link_to("Go", "#", class: "btn btn-secondary"))
Instead of rendering the button correctly, it appears as a separate input element in the top right corner. However, when I use capture, it works correctly. Is this a known issue?If I use capture it gives the result like this (
f.email_field(:email, append: capture { link_to("Go", "#", class: "btn btn-secondary")})
)dont use capture (
f.email_field(:email, append: link_to("Go", "#", class: "btn btn-secondary"))
)