Skip to content

Possible missing results #15

Closed
Closed
@manuartero

Description

@manuartero

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions