How to comment a block of code in RHTML file.

Hi Group.

I am just starting with Ruby on Rails. I have been stuck up (not
exactly stuck up but I need to figure this out). I need to comment a
block of code with HTML and RUBY code. Is there any way of commenting
an entire block of code?

Example:
<div id=<%="comment-#{comment.id}"%> class="s_view_comments_row">
<div class="s_view_user_thumbnail">
<%if comment.user.photo_exists?%>
</div><!--END s_view_user_thumbnail-->

How do I comment these 4 lines so that they are not executed when
the .rhtml is parsed.

Lalit

Hi you can do one of the follow:

<!-- add you comment here -->

or

<%# add your commt here -->

Good luck,

-Conrad

has there shortcut?

what shortcut? your IDE’s one?

AFAIK erb has no block commenting syntax. Here's what I usually do though:

<% if false -%>
  <div>....
<% end -%>