Skip to content

update_all not working as expected #197

Closed
@MichaelSp

Description

@MichaelSp

When I run this code:

Category.where(name: child_name).update_all parent_id: parent.id

the category_hierarchies-table is not populated correctly. Thus queries like category.ancestors.pluck(&:name) are always empty even though category.parent_id is right.

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