This will also work. In DRYML the class attribute is merged by
concatenation. (Other attributes are generally overridden).
In general, the containing element in most rapid tags should have a
merge-attrs or a merge. So if you see a tag missing it, just let us
know and will add it for you.
<def tag="transition-buttons">
<div class="transitions" merge-attrs>
<% this.lifecycle.available_transitions_for(current_user).each do |
t| %>
<transition-button transition="&t"/>
<% end %>
</div>
</def>
cheers,
Bryan
On Oct 6, 8:17 am, Spiralis <[email protected]> wrote:
> Hi,
>
> I just wanted to ask if the transition-buttons are meant to not pass
> on the class attribute? Not allowing this makes it harder to style.
>
> I have ended up redefining my "transition-buttons"-tag like this:
>
> <def tag='transition-buttons'>
> <%
> transition_classes = "transitions" + (all_attributes[:class]
> ? " " +
> all_attributes[:class] : "")
> %>
> <div class='#{transition_classes}'>
> <% this.lifecycle.available_transitions_for(current_user).each do |
> t| %>
> <transition-button transition='&t'/>
> <% end %>
> </div>
> </def>
>
> There's probably a neater way to fix this, but this worked for me.
>
> Regards,
> Ronny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---