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.
6329e9ce6b0c23f8bcf64a6c46a2bb81?d=identicon&s=25 matt (Guest)
on 2006-12-26 18: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?


34a7615f38496a5dafbb3e6b721c435e?d=identicon&s=25 Mohit Sindhwani (Guest)
on 2006-12-26 18:38
(Received via mailing list)
matt wrote:
> Thanks,
> Matt

<%# ... %>

6329e9ce6b0c23f8bcf64a6c46a2bb81?d=identicon&s=25 matt (Guest)
on 2006-12-26 18: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.