presuming you wouldn't want the last element in the collection to have
a BR tag anyway, you might get some mileage out of
@product.product_sizes.map(&:name).join("<br />\n"). completely ot of
course.RSL On Mon, Feb 9, 2009 at 8:55 AM, Evgeny <[email protected]> wrote: > Would look a bit better with > = after "<br/>" do > = blablabla > > On Sun, Feb 8, 2009 at 9:11 PM, Hampton <[email protected]> wrote: >> >> God I still hate #succeed. Its like the least semantic method in the >> entire universe for people to understand when reading. >> >> On Sun, Feb 8, 2009 at 2:06 PM, Chris Eppstein <[email protected]> >> wrote: >>> >>> Also you can do the following if you need to tack something on to more >>> than one line of rails code: >>> - for sizes in @product.product_sizes >>> = succeed "<br/>" do >>> = h sizes.name >>> Chris >>> On Sun, Feb 8, 2009 at 10:54 AM, Hampton <[email protected]> wrote: >>>> >>>> - for sizes in @product.product_sizes >>>> == #{h sizes.name} <br/> >>>> >>>> On Sun, Feb 8, 2009 at 11:54 AM, frede <[email protected]> wrote: >>>>> >>>>> Hi! >>>>> >>>>> Today I found Haml & Sass and I really like it! >>>>> >>>>> I played around with it and read the documentation but there are some >>>>> things I did not find out how to solve them and I even bought the >>>>> peepcode screencast and watched it. >>>>> >>>>> One major issue is the produced code. HTML is absolutely fine but when >>>>> I switched to the source view the code is not formated like I want it >>>>> to. As I said I read the documentation and so I know about the < and > >>>>> commands but how do I use them together with rails tags in a template. >>>>> >>>>> For example: >>>>> >>>>> - for sizes in @product.product_sizes >>>>> =h sizes.name >>>>> %br >>>>> >>>>> I would like to see the br-tag behind every name in the source view. >>>>> >>>>> name 1<br /> >>>>> name 2<br /> >>>>> name 3<br /> >>>>> >>>>> How can I do that? >>>>> >>>>> Many thanks for every answer. >>>>> >>>>> Regards, >>>>> Stefan >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
