Strange partial error


#1

I’m getting this weird partial problem.

I’m calling the partial like so:

<%= render :partial => partial,
:locals => {:message => message,
:display => display,
:indent => indent,
:button_type => button,
:terms => params[:search_terms]} %>

The object in message can be printed out first, and then within the
partial I can access it, and it returns false to message.nil? but when I
try to access elements like message.title from within the partial
template itself I get errors like this:

You have a nil object when you didn’t expect it!
The error occured while evaluating nil.title

Any ideas?

Many thanks in advance.

CHEERS> SAM