Forum: Ruby on Rails ERB Processing Question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
matt (Guest)
on 2006-12-26 19:31
(Received via mailing list)
When I'm coding my view, I like to comment out blocks of code while
testing and fiddling.

I've found that .rhtml / ERB doesn't use <!-- comment --> as a block
comment, it does translate it when viewed as html, however.

Is there a way to comment out blocks of code in ERB so that it doesn't
get processed?


Mohit S. (Guest)
on 2006-12-26 19:38
(Received via mailing list)
matt wrote:
> Thanks,
> Matt

<%# ... %>

matt (Guest)
on 2006-12-26 19:56
(Received via mailing list)
But this won't work if there is embedded Ruby..

It won't know where to end.

It would need an #%> to find the end of the block

This topic is locked and can not be replied to.