In my views I often find an error caused by trying to display a
property of a non-existent object.
Is there is a simpler way to avoid this than to append an ''if''
conditional at the end
of each statement where the ''belongs_to'' object does not
exist?
<% for person in @people %>
<tr>
<td><%=h person.address.streetname if person.address
%></td>
</tr>
<% end %>
thanks,
Mike
