[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: eRB <%=

Gavin Kistner

9/13/2006 7:54:00 PM

From: Jonas Hartmann [mailto:Mail@Jonas-Hartmann.com]
> whats eRBs <%= doing in contrast to <%?

My Template

<%
place = "World"
_erbout << "Hello"
%> <%=
place
%>

<%
# Your ruby code here. The 'return value' of
# the last statement does nothing
"NOT IN THE OUTPUT"
%>

When an equals sign is involved, the 'return value'
of the last statement is turned into a string
and inserted into the output.
<%="THIS WILL BE IN THE OUTPUT"%>