I have some associations setup such that:
When viewing a particular job, I have the following iteration:
<% for application in @job.applications %>
<%= h application.candidate.name %>
<% end %>
I am getting a nil object error when evaluating nil.name. If I delete
“name”, I can see the candidate object and if I change it
application.candidate_id, I see the candidate_id for the application.
I have setting the @applications variable in the controller rather
than go through the association in the view but still get the same
My only thought is that maybe the model named Application is causing
trouble but wouldn’t want to change this on a hunch!
Does anyone have any thoughts?