richard apodaca
2007-Sep-05 23:28 UTC
[Betternestedset-talk] NoMethodError when using all_children_count on single-node set
Noob here. When I try to use methods such as
all_children_count (and other methods) on a set
consisting of a single node, I get the following
error:
NoMethodError: 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.-
from
./script/../config/../config/../vendor/plugins/betternestedset/lib/better_nested_set.rb:564:in
`all_children_count''
from (irb):27
I get no such error if children are present. And
has_chidren? doesn''t produce the error.
Does anyone else see the same thing?
thanks,
Rich
____________________________
Richard Apodaca
Blog: http://depth-first.com