or <span class="<%= [class1, class2].join(" ") %>">
-- YehudaOn Thu, Apr 9, 2009 at 7:39 PM, Shalon Wood <[email protected]> wrote: > > > Er... why not just do > > <span class="<%= "#{class1} #{class2}" %>"> </span> > > ? > > That's what I do (well, did, before I refactored a bunch of stuff out > into a helper a couple of days ago). > > Shalon Wood > > Jon Hancock <[email protected]> writes: > > > your method breaks it up into something like this: > > > > <span class="class1" class2=""> </span> > > > > I've tried to debug this a year or so ago...I never found a way where > > merb/erb didn't screw it up. This seems to be a case of ruby libs > > trying too hard. > > > > Does anyone have a hack around this problem? > > > > thanks, Jon > > > > > > On Apr 9, 7:40 pm, "Michael D'Auria" <[email protected]> wrote: > >> How about: > >> <span class=<%= "%s %s" % [class1, class2] %>> </span> > >> > >> Michael > >> > >> On Thu, Apr 9, 2009 at 8:07 PM, Jon Hancock <[email protected]> > wrote: > >> > >> > I have the following erb code: > >> > >> > <span class=<%= [class1, class2] %>> </span> > >> > >> > The result is class="class1class2". Of course what I want is > >> > class="class1 class2". > >> > >> > I have tried many variations, such as: > >> > >> > <span class=<%= class1 + " " + class2] %>> </span> > >> > >> > Nothing seems to work. I cannot specify multiple classes. It always > >> > gets munged into a single class name. > >> > >> > Any ideas? > >> > >> > thanks, Jon > > > > > > > -- > > > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
