hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-12 11:13 UTC
Block comment in rhtml file
Hi all, Is there tags for block comment in rhtml, so that I can comment out a block of code (mainly for testing/debuging)? <!-- --> html comment can''t prevent ERb code from processed <%# text inside become comment %> only comment out the the tag It''s quite inconvenient not to have such facility. Thanks, - Chuong --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hi all, > > Is there tags for block comment in rhtml, so that I can comment out a > block of code (mainly for testing/debuging)? > > <!-- --> html comment can''t prevent ERb code from processed > <%# text inside become comment %> only comment out the the tag > > It''s quite inconvenient not to have such facility.You mean like: <% if false -%> ...everything skipped... <% end -%> ? -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-13 03:21 UTC
Re: Block comment in rhtml file
Hi Michael, It''s something like that, but your suggestion is just a workaround. There''s no built-in in rhtml to do this? I want the editor to mark it as comment also. In Java JSP files, you have <%-- comment --%> However your way is useful at some level. Thanks, - Chuong On Mar 12, 6:18 pm, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote:> hnchu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > Hi all, > > > Is there tags for block comment in rhtml, so that I can comment out a > > block of code (mainly for testing/debuging)? > > > <!-- --> html comment can''t prevent ERb code from processed > > <%# text inside become comment %> only comment out the the tag > > > It''s quite inconvenient not to have such facility. > > You mean like: > > <% if false -%> > ...everything skipped... > <% end -%> > > ? > > -- > Michael Wang--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I believe =begin %> <% your ruby code here %> <% and some more %> =end %> will work. Make sure the ''='' sign is the first thing on a line. Grant On 3/12/07, hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Michael, > > It''s something like that, but your suggestion is just a workaround. > There''s no built-in in rhtml to do this? I want the editor to mark it > as comment also. > > In Java JSP files, you have <%-- comment --%> > > However your way is useful at some level. > > Thanks, > - Chuong > > On Mar 12, 6:18 pm, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote: > > hnchu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > Hi all, > > > > > Is there tags for block comment in rhtml, so that I can comment out a > > > block of code (mainly for testing/debuging)? > > > > > <!-- --> html comment can''t prevent ERb code from processed > > > <%# text inside become comment %> only comment out the the tag > > > > > It''s quite inconvenient not to have such facility. > > > > You mean like: > > > > <% if false -%> > > ...everything skipped... > > <% end -%> > > > > ? > > > > -- > > Michael Wang > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Grant Gelinas-Brown wrote:> I believe > > =begin %> > > <% your ruby code here %> > <% and some more %> > > =end %> > > will work. Make sure the ''='' sign is the first thing on a line.Nope, doesn''t work. -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3/12/07, hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <hnchuong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It''s something like that, but your suggestion is just a workaround. > There''s no built-in in rhtml to do this? I want the editor to mark it > as comment also. > > In Java JSP files, you have <%-- comment --%> > > However your way is useful at some level.<%# <p>This <%= does %>n''t work?</p> %> jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---