How do you comment out html mixed with ruby code?
some text <% ... %> more text <%= ... %>
something else
<% ... %>
In js
<%#=
...commented
multiline
block...
%>
I wouldn't count as a solution, but perhaps enclosing the chunk between an
<% if false %>
...
<% end %>
or if you feel a little dirty, create a helper that simply outputs nothing.
I've never needed it, but I'm stumbled there seems to be no out-of-the-box solution for this.
To comment out erb tags use the ruby comment hash symbol before the = sign in the opening tag
<p>
This is some text I want to keep
<%= @some_object.some_attribute %>
</p>
<p>
I want to keep this text but comment out the erb tag
<%#= @some_object.another_attribute %>
</p>
<!--
<p>
I want all of this text commented out including the erb tag
<%#= @some_object.some_attribute %>
</p>
-->
<!--
<p>
I just want this html commented out but I want to keep the erb tag
<%= @some_object.some_attribute %>
</p>
-->
This is the onlyone that worked for me.
<%
=begin %>
code code code code code code
code code code code code code
code code code code code code
code code code code code code
=end %>