Closed ttp closed 8 years ago
please add tests.
@aaronblohowiak tests added
+1 this is super useful
It's definitely needed functionality. Adding CSS classes depending on some conditions is even more important. This really shouldn't be necessary:
:if (app.identifier === App.Configuration.app_id)
%li.active
%a(href=app.url)= app.name
:else
%li
%a(href=app.url)= app.name
and it will get out of hand quickly when the markup get's more complex.
Usage:
this adds these attributes only if model returns "not false" value
For now I have to duplicate such blocks with combinations of these attributes