Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_all not working as expected #197

Closed
MichaelSp opened this issue Feb 2, 2016 · 1 comment
Closed

update_all not working as expected #197

MichaelSp opened this issue Feb 2, 2016 · 1 comment

Comments

@MichaelSp
Copy link

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.

@mceachen
Copy link
Collaborator

mceachen commented Feb 2, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants