Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root797705yErb is friendly and easy. I've never had a problem with it. It does what it's supposed to, does it well, and doesn't do anything extra.
I didn't like HAML much, but it's been so long I can't remember why. I hate significant whitespace, so that's probably most of it. It is, however, much more ruby-like, which gives it some definite points.
There are other choices too, like slim, but I think most of the rest have died. (Like Shoes 😅). Slim is the other big alternative, and is ostensibly faster than erb/haml. Though I found myself hating it for several reasons, notably needing a filthy hack to inject rails data into JS. I don't remember all of the reasons, but I'd ranted about Slim many times while working with it. But maybe it's less terrible now? It has been several years, so it's worth checking out if you're strongly considering haml. -
@Root I have never found any reason to not use ERB, was not really looking for an alternative since I pretty much have it in the form of JS frontends, but I really wanted to know the opinion of other experienced Rails devs regarding this one.
-
bioDan56225yI prefer haml over erb. Minimizes the size of the file which makes it much more readable and its also easier to write.
Related Rants
For my peeps in the RoR arena, did y'all ever felt the need to change from ERB as yout server side rendering engine of choice?
I find it hard to use anything else, i would normally stick to it unless I was using Rails as an API and leave the frontend to React or Vue.
Asking about y'alls opinion because I knew about HAML from a while back. But never really used it and I find Rails with ERB to be really efficient.
Ruby pagebuilding with ERB is really flipping comfortable man.ERB has been my favorite for years.
Currently migrating a project to use Svelte and wanted to see what some of y'all think about Haml or erb. Just for the sake of curiosity. Don't know how many rails users we have in here.
question
rails
yomomma
ruby on rails