I’d like to be able to comment out a few lines of RHTML code easily.
With HTML you can just surround the code in , but if you
do that with the RHTML, it still gets executed, then the resulting
HTML is commented out. Sometimes I’d like to be able to leave the
code in but not have it evaluated…usually just for quick tests, but
sometimes I want to take the snippet out for a few days. As it is, I
have to copy it and save it in a new file. Is it possible to just
comment it out somehow so it doesn’t get eval’ed?
I’d like to be able to comment out a few lines of RHTML code easily.
With HTML you can just surround the code in , but if you
do that with the RHTML, it still gets executed, then the resulting
HTML is commented out. Sometimes I’d like to be able to leave the
code in but not have it evaluated…usually just for quick tests, but
sometimes I want to take the snippet out for a few days. As it is, I
have to copy it and save it in a new file. Is it possible to just
comment it out somehow so it doesn’t get eval’ed?
Pat
Try:
<%= # this won’t get executed
%>
–Dean
Take your time, take your chances
[3278.7 km, 273.4] Apparent Rennerian
It matters not how strait the gate, / How charged with punishments the
scroll,
I am the master of my fate: / I am the captain of my soul. –
Invictus –
– William E
Henley –
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.