I’m new to Ruby, and I found the <%= @my_variable %> a little lengthy and less readable. Shouldn’t erb have something like ${@my_variable} (like the good old Velocity engine in Java)?
I’m new to Ruby, and I found the <%= @my_variable %> a little lengthy
Share
erb, as its name suggests, is intended for embedded ruby code. I don’t think it has any other syntax beyond the following recognised tags:
If you don’t like erb syntax there are other alternative template engines for Ruby. Take a look at Haml, Liquid, Mustache or Tenjin.