Ruby-on-rails – Best way to add comments in erb

block-commentscommentserbrubyruby-on-rails

How do we add comments in erb files, if we do not want them to be generated into the html content?

Best Answer

Use the <%# %> sequence, e.g.

<%# This is a great comment! %>