Forum: Ruby on Rails ERB Processing Question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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?

Thanks,

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

<%# ... %>

Cheers
Mohit
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


Matt
This topic is locked and can not be replied to.