Reputation: 296
I've installed Awesome Nested Set, but something weird happens when I try to create any object that has acts_as_nested_set.
undefined method `parent_id_changed?' for #<Post:0x5671830>
in this line:
@post = Post.create!(params[:post])
Similarly, I get undefined method `parent_id_changed?' for comments and nested comments:
@comment = Comment.create!(params[:comment])
@comment.move_to_child_of(@post)
Upvotes: 1
Views: 1276
Reputation: 107728
It looks like you're missing a field called parent_id
on the comments
table.
Upvotes: 1