Problems accessing relational objects

Dominic Son wrote:

<% @ads.each do |ad| %>
<%= %> (will say it's false, but yet...)
<%= %> (will give the following error:
<% end %>

"You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.attributes"

I would try looking at the objects with debug:
<%= debug ad %>
<%= debug %>

Dan Manges