I think constructing it as an array is clearer. You could create a helper to
convert the hash if you want.

On Wed, Aug 25, 2010 at 6:19 AM, Bogdan Gusiev <[email protected]> wrote:

> When I have conditional classes like: "disabled" if
> @user.followable_by?(current_user) mixed with static classes like:
> "big-blue-button". I want to be able to specify them as hash like:
>
> %a{:class => {:disabled => [email protected]_by?(current_user), :big-
> blue-button => true}}
>
> Keys of the hash tells class name and values tell when class should be
> included.
>
> I think it's better than construct this hash as array by hands.
>
> --
> 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.

Reply via email to