Classes and ids can be made dynamic in the attributes hash like any other
attribute. For example: %div#main{:class => controller_name}On Sat, Apr 3, 2010 at 9:56 PM, Brewster <[email protected]> wrote: > is it possible to insert ruby code as the class or id of an element? > > for example, something like... > > %div#main.#{controller_name} > > that would render > > <div class="controllerName" id="main"></div> > > -- > 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] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- 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.
