Hi Group. I am just starting with Ruby on Rails. I have been stuck up (not exactly stuck up but I need to figure this out). I need to comment a block of code with HTML and RUBY code. Is there any way of commenting an entire block of code? Example: <div id=<%="comment-#{comment.id}"%> class="s_view_comments_row"> <div class="s_view_user_thumbnail"> <%if comment.user.photo_exists?%> </div><!--END s_view_user_thumbnail--> How do I comment these 4 lines so that they are not executed when the .rhtml is parsed. Lalit --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi you can do one of the follow: <!-- add you comment here --> or <%# add your commt here --> Good luck, -Conrad On 5/20/07, Lalit <lalitpatel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Group. > > I am just starting with Ruby on Rails. I have been stuck up (not > exactly stuck up but I need to figure this out). I need to comment a > block of code with HTML and RUBY code. Is there any way of commenting > an entire block of code? > > Example: > <div id=<%="comment-#{comment.id}"%> class="s_view_comments_row"> > <div class="s_view_user_thumbnail"> > <%if comment.user.photo_exists?%> > </div><!--END s_view_user_thumbnail--> > > How do I comment these 4 lines so that they are not executed when > the .rhtml is parsed. > > Lalit > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
has there shortcut? On 5/21/07, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi you can do one of the follow: > > <!-- add you comment here --> > > or > > <%# add your commt here --> > > Good luck, > > -Conrad > > On 5/20/07, Lalit <lalitpatel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi Group. > > > > I am just starting with Ruby on Rails. I have been stuck up (not > > exactly stuck up but I need to figure this out). I need to comment a > > block of code with HTML and RUBY code. Is there any way of commenting > > an entire block of code? > > > > Example: > > <div id=<%="comment-#{comment.id}"%> class="s_view_comments_row"> > > <div class="s_view_user_thumbnail"> > > <%if comment.user.photo_exists?%> > > </div><!--END s_view_user_thumbnail--> > > > > How do I comment these 4 lines so that they are not executed when > > the .rhtml is parsed. > > > > Lalit > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
what shortcut? your IDE''s one? On 21/05/07, guo william raym <williamraym-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > has there shortcut? > > On 5/21/07, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi you can do one of the follow: > > > > <!-- add you comment here --> > > > > or > > > > <%# add your commt here --> > > > > Good luck, > > > > -Conrad > > > > On 5/20/07, Lalit <lalitpatel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hi Group. > > > > > > I am just starting with Ruby on Rails. I have been stuck up (not > > > exactly stuck up but I need to figure this out). I need to comment a > > > block of code with HTML and RUBY code. Is there any way of commenting > > > an entire block of code? > > > > > > Example: > > > <div id=<%="comment-#{comment.id}"%> class="s_view_comments_row"> > > > <div class="s_view_user_thumbnail"> > > > <%if comment.user.photo_exists?%> > > > </div><!--END s_view_user_thumbnail--> > > > > > > How do I comment these 4 lines so that they are not executed when > > > the .rhtml is parsed. > > > > > > Lalit > > > > > > > > > > > > > > > > > > > > > > > >-- in03ng a.k.a inung a.k.a nursamsi a.k.a nur syamsi Y! in03ng --~--~---------~--~----~------------~-------~--~----~ 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 5/21/07, Lalit <lalitpatel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi Group. > > I am just starting with Ruby on Rails. I have been stuck up (not > exactly stuck up but I need to figure this out). I need to comment a > block of code with HTML and RUBY code. Is there any way of commenting > an entire block of code? > > Example: > <div id=<%="comment-#{comment.id}"%> class="s_view_comments_row"> > <div class="s_view_user_thumbnail"> > <%if comment.user.photo_exists?%> > </div><!--END s_view_user_thumbnail--> > > How do I comment these 4 lines so that they are not executed when > the .rhtml is parsed.AFAIK erb has no block commenting syntax. Here''s what I usually do though: <% if false -%> <div>.... <% end -%> -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---