<!-- if true, YES --> <%= transaction.is_maid_online? ? "YES" : "NO" %> <!-- if date have value, format the value --> <td><%= transaction.certification_date.strftime("%d/%m/%Y") if transaction.certification_date? %></td>