Forum: Ruby on Rails strange partial error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb33b32bd5d675db7be148542976e510?d=identicon&s=25 Sam Joseph (Guest)
on 2006-05-16 13:37
(Received via mailing list)
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
This topic is locked and can not be replied to.