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? -- 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 -~----------~----~----~----~------~----~------~--~---
Try... <%= x -%> On Thu, Mar 5, 2009 at 3:46 PM, Aryk Grosz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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? > -- > Posted via http://www.ruby-forum.com/. > > > >-- Robby Russell Chief Evangelist, Partner PLANET ARGON, LLC design // development // hosting w/Ruby on Rails http://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] --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Nope, that didn''t work. That actually causes that line to not show up. Anybody else have any thoughts? Aryk Robby Russell wrote:> Try... > > <%= x -%> > > On Thu, Mar 5, 2009 at 3:46 PM, Aryk Grosz > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> 1 >> >> What am I doing wrong? >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > > -- > Robby Russell > Chief Evangelist, Partner > > PLANET ARGON, LLC > design // development // hosting w/Ruby on Rails > > http://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]-- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---