Skip to content

Update ancestry_path without record reloading. #145

Open
@kremen

Description

@kremen

After record attribute updating ancestry_path is out-of-date.
It becomes up-to-date after record reloading.

d = Tag.find_or_create_by_path %w[a b c d]
d.update {name: 'new_d'}
d.ancestry_path
=> ["a", "b", "c", "d"]
d.reload
d.ancestry_path
=> ["a", "b", "c", "new_d"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions