So i want to implement the acts_as_tree gem for my User model. The column that i want to be in a tree form is my "account_type". account_type could be "admin, leader, member"
root = admin
root.children = leader
leader.children = member
Basically, admin is the parent of leader and leader is the parent of member.
In my create method for new User i did the following
@user = User.new root = @user.create("account_type" => "admin")
but i got an error undefined method create.. I am a bit confused as to how can i initialize or implement the acts_as_tree gem from the controller
Any ideas will be appreciated
Thanks