Re: [Rails] Re: nil object - very strange behavior
2009/11/24 MaD <mayer.dominik@gmail.com>:
>
> maybe i'm wrong, but it could be something like the following:
>
> if your users (=hits) are User.find_by_ferret and thus of the class
> User. a user.user would return nil, like in this line:
> users.concat(hits.collect { |hit| hit.user }).uniq!
> now you have a collection of nils and try to call nil.info on them.
>
> in any case set a debugger and take a deeper look into your variables.
>
You may find the rails guide on debugging useful. In particular how
to use ruby-debug. (google rails guides)
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home