Can anybody tell me what the closing erb tag in this expression means? <%= @myobject -%> as opposed to <%= @myobject %> ? (Sorry if this is trivial, but I can''t find anything in the ERb documentation, and those characters are hard to search the web on) Lee ********************************* All that is gold does not glitter. Not all those who wander are lost. The old who are strong do not whither. Deep roots are not touched by the frost. -- J.R.R. Tolkein _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Lee, It suppresses the following newline from your output. Stops the output from having extra blank lines in it. Cheers On 10/25/05, Lee Pope <leepope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Can anybody tell me what the closing erb tag in this expression means? > > <%= @myobject -%> > > as opposed to > > <%= @myobject %> > > ? > > (Sorry if this is trivial, but I can''t find anything in the ERb > documentation, and those characters are hard to search the web on) > > Lee > > ********************************* > > All that is gold does not glitter. > Not all those who wander are lost. > The old who are strong do not whither. > Deep roots are not touched by the frost. > -- J.R.R. Tolkein > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Is that documented anywhere? If so, where? I was hunting for it recently, and couldn''t find it... -- Alex Liquid wrote:> Hi Lee, > > It suppresses the following newline from your output. Stops the output from > having extra blank lines in it. > > Cheers > > On 10/25/05, Lee Pope <leepope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>Can anybody tell me what the closing erb tag in this expression means? >> >><%= @myobject -%> >> >>as opposed to >> >><%= @myobject %> >> >>? >> >>(Sorry if this is trivial, but I can''t find anything in the ERb >>documentation, and those characters are hard to search the web on) >> >>Lee >> >>********************************* >> >>All that is gold does not glitter. >>Not all those who wander are lost. >>The old who are strong do not whither. >>Deep roots are not touched by the frost. >>-- J.R.R. Tolkein >> >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I found this in the AWDOR book. p82 On 10/25/05, Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote:> > Is that documented anywhere? If so, where? I was hunting for it > recently, and couldn''t find it... > > -- > Alex > > Liquid wrote: > > Hi Lee, > > > > It suppresses the following newline from your output. Stops the output > from > > having extra blank lines in it. > > > > Cheers > > > > On 10/25/05, Lee Pope <leepope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >>Can anybody tell me what the closing erb tag in this expression means? > >> > >><%= @myobject -%> > >> > >>as opposed to > >> > >><%= @myobject %> > >> > >>? > >> > >>(Sorry if this is trivial, but I can''t find anything in the ERb > >>documentation, and those characters are hard to search the web on) > >> > >>Lee > >> > >>********************************* > >> > >>All that is gold does not glitter. > >>Not all those who wander are lost. > >>The old who are strong do not whither. > >>Deep roots are not touched by the frost. > >>-- J.R.R. Tolkein > >> > >> > >>_______________________________________________ > >>Rails mailing list > >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > >> > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
The thing is, ERb''s standard Ruby, not Rails-specific. Surely it should be documented with the official reference documentation? What other goodies are lurking undocumented? -- Alex Liquid wrote:> I found this in the AWDOR book. p82 > > > On 10/25/05, Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote: > >>Is that documented anywhere? If so, where? I was hunting for it >>recently, and couldn''t find it... >> >>-- >>Alex >> >>Liquid wrote: >> >>>Hi Lee, >>> >>>It suppresses the following newline from your output. Stops the output >> >>from >> >>>having extra blank lines in it. >>> >>>Cheers >>> >>>On 10/25/05, Lee Pope <leepope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> >>>>Can anybody tell me what the closing erb tag in this expression means? >>>> >>>><%= @myobject -%> >>>> >>>>as opposed to >>>> >>>><%= @myobject %> >>>> >>>>? >>>> >>>>(Sorry if this is trivial, but I can''t find anything in the ERb >>>>documentation, and those characters are hard to search the web on) >>>> >>>>Lee >>>> >>>>********************************* >>>> >>>>All that is gold does not glitter. >>>>Not all those who wander are lost. >>>>The old who are strong do not whither. >>>>Deep roots are not touched by the frost. >>>>-- J.R.R. Tolkein >>>> >>>> >>>>_______________________________________________ >>>>Rails mailing list >>>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>>http://lists.rubyonrails.org/mailman/listinfo/rails >>>> >>>> >>>> >>> >>> >>> >>>------------------------------------------------------------------------ >>> >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
This is actually undocumented stuff in ERB. You can find it when reading the source ( /lib/ruby/1.8/erb.rb ) the - thing is one of the trim modes. On 10/25/05, Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote:> The thing is, ERb''s standard Ruby, not Rails-specific. Surely it should > be documented with the official reference documentation? What other > goodies are lurking undocumented? > > -- > Alex > > Liquid wrote: > > I found this in the AWDOR book. p82 > > > > > > On 10/25/05, Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote: > > > >>Is that documented anywhere? If so, where? I was hunting for it > >>recently, and couldn''t find it... > >> > >>-- > >>Alex > >> > >>Liquid wrote: > >> > >>>Hi Lee, > >>> > >>>It suppresses the following newline from your output. Stops the output > >> > >>from > >> > >>>having extra blank lines in it. > >>> > >>>Cheers > >>> > >>>On 10/25/05, Lee Pope <leepope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> > >>> > >>>>Can anybody tell me what the closing erb tag in this expression means? > >>>> > >>>><%= @myobject -%> > >>>> > >>>>as opposed to > >>>> > >>>><%= @myobject %> > >>>> > >>>>? > >>>> > >>>>(Sorry if this is trivial, but I can''t find anything in the ERb > >>>>documentation, and those characters are hard to search the web on) > >>>> > >>>>Lee > >>>> > >>>>********************************* > >>>> > >>>>All that is gold does not glitter. > >>>>Not all those who wander are lost. > >>>>The old who are strong do not whither. > >>>>Deep roots are not touched by the frost. > >>>>-- J.R.R. Tolkein > >>>> > >>>> > >>>>_______________________________________________ > >>>>Rails mailing list > >>>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>>------------------------------------------------------------------------ > >>> > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >>_______________________________________________ > >>Rails mailing list > >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://jadedpixel.com - modern e-commerce software http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog