Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wellington1993/defec52deac811372fd686c4ac4824d4 to your computer and use it in GitHub Desktop.
Save wellington1993/defec52deac811372fd686c4ac4824d4 to your computer and use it in GitHub Desktop.
Comment lines in ruby rails html.erb files, as answered on StackOverflow http://stackoverflow.com/a/3901665/123781
To comment a single line use
<%-# commented line -%>
This also works
<%# my comment %>
To comment a whole block use a if false to surrond your code like this
<% if false %>
code to comment
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment