SpringFlowers AutumnMoon
2007-Sep-28 18:01 UTC
RoR uses something rather than erb or eRuby?
it seems that RoR doesn''t use erb or eRuby to generate its output for rhtml? the program erb and the description of eRuby at http://www.eruby.info both said that <% print "foo bar" %> or <% puts "hello" %> will be placed into the output... but currently for RoR, it won''t... only <%= expr %> is doing it and it cannot be print or puts, but the evaluated value of expr. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
SpringFlowers AutumnMoon wrote:> it seems that RoR doesn''t use erb or eRuby to generate its output for > rhtml? > > the program erb and the description of eRuby at > > http://www.eruby.info > > both said that > > <% print "foo bar" %> or <% puts "hello" %>They go into STDOUT, hence out your program. They don''t put anything into the returned string. Only <%= ... %> does that. So, yes RoR definitely uses eRB. -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
SpringFlowers AutumnMoon
2007-Sep-29 14:09 UTC
Re: RoR uses something rather than erb or eRuby?
Phlip wrote:> SpringFlowers AutumnMoon wrote: > >> it seems that RoR doesn''t use erb or eRuby to generate its output for >> rhtml? >> >> the program erb and the description of eRuby at >> >> http://www.eruby.info >> >> both said that >> >> <% print "foo bar" %> or <% puts "hello" %> > > They go into STDOUT, hence out your program. They don''t put anything > into the returned string. Only <%= ... %> does that. > > So, yes RoR definitely uses eRB.ah, i see... c:\> erb foo.txt prints out both because one is the processed evaluated value and one is the STDOUT. but when erb is in RoR, then the evaluated value goes to the HTML code but the STDOUT goes to the console. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---