rails / acts_as_list

NOTICE: official repository moved to https://github.com/swanandp/acts_as_list

Home Page:http://rubyonrails.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph like behaviour

yamanyar opened this issue · comments

I can store a relation that is a graph in fact. Is it expected? I think it should throw an exception when it recycling. Here is the test (please note that this test passes; however i am expecting it to fail):

category = Category.new
category.name="Parent"
category.save
child = category.children.create("name" => "child_1")
child.children = [category]
assert category.save
loadedChild = Category.find_by_name("child_1")
assert_equal "Parent", loadedChild.parent.name
assert_equal "Parent", loadedChild.children[0].name

Hello Yamanyar,

This fork is no longer maintained. Can you post this issue at the new location: https://github.com/swanandp/acts_as_list

Thanks,
Mark

Thanks for the update,
Cheers,
Yamanyar