Skip to content

call should take ERB #1280

Answered by camertron
boardfish asked this question in Ideas
Feb 14, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @boardfish, sorry we've taken a long time to respond.

I think putting ERB into Ruby files is a great idea 😄 That's the sort of approach to templating Rux advocates for and what JSX does too. While I would personally prefer to see a transpilation step or even template language support built into Ruby, that's probably a long way off.

I wonder if it makes sense to stop at just supporting inline ERB. What about HAML, Slim, etc? We could have method suffixes like call_erb, call_haml, etc that could automatically invoke the correct template handler.

My only real concern is that people might think they should write all their components this way, which IMHO is a mistake for larger components.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@boardfish
Comment options

boardfish Mar 28, 2022
Maintainer Author

Answer selected by boardfish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants