Closed
Description
Hi, I was working with Closure-tree gem and I noticed this
1.9.3p194 :019 > m.self_and_ancestors
=> [# CuisineType id: 27, name: "m", parent_id: 22 ]
so we have "m" with a parent... not in the list
1.9.3p194 :020 > m.parent
=> # CuisineType id: 22, name: "e", parent_id: nil
For me, the "logic" behaviour should be smth like
console > m.self_and_ancestors
=> [# ...m..., #...e...]
At least I've resolved it creating my own function (recursive simple one). I've posted it just for "help the developers if it were really a bug"
Apart from that the gem is sooo nice ^^
Manu
Metadata
Metadata
Assignees
Labels
No labels