in transactions, sometimes customers do not have service_id
because they did not add additional services to cart. problem is, transactions
index page returns undefined method 'name' for nil:NilClass
on line
<%= transaction.service.name %>
Is there any way better than
<%= transaction.service.present? ? transaction.service.name : nil %>
I found this NULL OBJECT PATTERN article. didn't quite understand how it applies on my scenario.