Anybody know if it''s possible to have multiline text in Markaby without resorting to a bunch of text statements or putting the text block in another file and using render :file ? I need to add chunks of HTMLized javascript to my templates. Joe -- Posted via http://www.ruby-forum.com/.
On Thu Aug 17, 2006 at 04:27:47AM +0200, Joe Ruby wrote:> Anybody know if it''s possible to have multiline text in Markaby without > resorting to a bunch of text statements or putting the text block in > another file and using render :file ? I need to add chunks of HTMLized > javascript to my templates.self << <<''JS'' <img src=JoesShoes.gif id=hithere> <script> $(''hithere'').addListener(shoeFactory) </script> JS note, i havent tried this (yes i think the double <<s are confusing. i guess you could use text <<''whatever'' too...> > Joe > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
How about just the standard Ruby way? long_text = <<-END_OF_STRING A Javascript Is an ugly thing END_OF_STRING On 8/17/06, Joe Ruby <joeat303@yahoo.com> wrote:> Anybody know if it''s possible to have multiline text in Markaby without > resorting to a bunch of text statements or putting the text block in > another file and using render :file ? I need to add chunks of HTMLized > javascript to my templates. > > Joe > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
J?n Borg??rsson wrote:> How about just the standard Ruby way? > > long_text = <<-END_OF_STRING > A Javascript > Is an ugly thing > END_OF_STRING >Ah, forgot about that -- thanks! Joe -- Posted via http://www.ruby-forum.com/.