Comment in html.erb file

来源:互联网 发布:莱昂纳德 知乎 编辑:程序博客网 时间:2024/06/06 00:09

There are 2 ways to comment in a html.erb file:

1. Comment a single line:

<%# commented line %>e.g.<%# = f.label :price_high %><br>  

2. Comment a block: use a if false to surrond your codes like this:

<% if false %>codes to comment<% end %>e.g.  <% if false %>  <%= f.label :price_low %><br>   <% end %>   
0 0