I have two models, TreeNode and User. Each user has_one
TreeNode, which is the root of the tree.
class TreeNode
acts_as_tree
belongs_to :user
end
class User
has_one :tree_node
end
I would like to have this setup so that rails will make the association so that I can do something like
User.first.tree
instead of
User.first.tree_node
How would one go about doing something like this?