Wondering if there is a way to write a ternary, or shorter form of if statement, which adds the 'a' element to the table cell when the if is satisfied.
I tried this, but it doesn't work:
td= foo.x ? a(href="/#{foo.x}/foobar") View : '-'
The following does work, but is quite long winded and untidy..
tbody
each foo in bar
tr
td= foo.name
if foo.x
td
a(href="/#{foo.x}/foobar") View
else
td -
if foo.y
td
a(href="/#{foo.y}/hello") Hello
else
td -
Thanks