Skip to content

Instantly share code, notes, and snippets.

@Yax
Created September 4, 2009 21:36
Show Gist options
  • Select an option

  • Save Yax/181160 to your computer and use it in GitHub Desktop.

Select an option

Save Yax/181160 to your computer and use it in GitHub Desktop.
NoMethodError in Tickets#show
Showing app/views/messages/_messages.html.erb where line #6 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
Extracted source (around line #6):
3: <th>Od:</th>
4: <th>Wiadomosc:</th>
5: </tr>
6: <% for message in @messages %>
7: <tr>
8: <td><%=h message.from %></td>
9: <td><%=h truncate(message.content, :length => 80) %></td>
Trace of template inclusion: app/views/tickets/show.html.erb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment