Created
January 4, 2012 18:30
-
-
Save scottmessinger/1561367 to your computer and use it in GitHub Desktop.
optional class?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%table | |
%tr | |
%td{ ADD OPTIONAL CLASS HERE } | |
Text | |
Text | |
Text |
ngauthier
commented
Jan 4, 2012
Awesome. Thanks!
…On Wednesday, January 4, 2012, Nick Gauthier < ***@***.***> wrote:
``` haml
%td{:class => (truthy_value ? "yes" : nil)}
```
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1561367
or
%td{:class => ("yes" if truthy_value)}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment