You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
milk=Category.find_by(name: 'milk')Category.create(name: 'acid milk',parent: milk)# => this worked for meCategory.where(name: 'acid milk',parent: milk)# => this not worked, not implement yet ??# PG::UndefinedColumn: ERROR: column categories.parent does not exist
The text was updated successfully, but these errors were encountered:
Ancestry only uses the ancestry column. i.e. parent_id is not an ActiveRecord column. Instead, parent and parent_id are methods, so you cannot use parent in a where-clause.
The text was updated successfully, but these errors were encountered: