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.

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

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.