As you can see, the post belongs to a user and I am printing out the user display name for every post.
This is a pretty common thing in every rails app I ever saw, some preload, some let it go N+1 without caring.
The problem is, that if you don’t have the user in the database, the view code will fail on NoMethodError for NilClass.
that is exactly why we have #try:
<%= post.try(:user) { |u| u.display_name } || “Unknown user” %>