According to numerous ERB tutorials, the following example:
<%- [1,2,3].each do |x| -%>
<%= x %>
<%- end -%>
should output:
1
2
3
Instead, it outputs:
1
2
3
What am I doing wrong?
According to numerous ERB tutorials, the following example:
<%- [1,2,3].each do |x| -%>
<%= x %>
<%- end -%>
should output:
1
2
3
Instead, it outputs:
1
2
3
What am I doing wrong?
Try…
<%= x -%>
On Thu, Mar 5, 2009 at 3:46 PM, Aryk G.
[email protected] wrote:
 1
What am I doing wrong?
Posted via http://www.ruby-forum.com/.
–
Robby R.
Chief Evangelist, Partner
PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails
http://robbyonrails.com/
http://twitter.com/planetargon
aim: planetargon
+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
Nope, that didn’t work. That actually causes that line to not show up.
Anybody else have any thoughts?
Aryk
Robby R. wrote:
Try…
<%= x -%>
On Thu, Mar 5, 2009 at 3:46 PM, Aryk G.
[email protected] wrote:Â 1
What am I doing wrong?
Posted via http://www.ruby-forum.com/.
–
Robby R.
Chief Evangelist, PartnerPLANET ARGON, LLC
design // development // hosting w/Ruby on Railshttp://planetargon.com/
http://robbyonrails.com/
http://twitter.com/planetargon
aim: planetargon+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs