Currently pretty much all Rails helpers call tag
or content_tag
internally to generate tags.
To integrate Hexp with Rails it's possible to override those two methods, and now helpers return syntax tree objects rather than strings.
The main exception are helpers that generate several tags and then join the result.
What I would love to see (I'd happily make a PR) is that helpers use an internal method (e.g. join_tags
) that just delegates to Array#join
, but that one can override like tag
and content_tag
.
I admit it's a niche use case, but it would be a relatively small, backwards compatible change. And it would make an hexp-rails gem a lot more straightforward. Right now I need to duplicate all helpers that call join, whereas the other just work "out of the box"