Skip to content

Instantly share code, notes, and snippets.

@jonathan-beebe
Created February 20, 2014 19:06
Show Gist options
  • Save jonathan-beebe/9120901 to your computer and use it in GitHub Desktop.
Save jonathan-beebe/9120901 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