Open
Description
I'm currently migrating from awesome_nested_set to this beautiful gem and I noticed that #root
for an entry returns nil until the record got saved even if a parent is set.
My current workaround (but I don't know if it breaks anything):
has_closure_tree # MUST BE AFTER attr_accessible/self.table_name=
# fix root being nil until persisted
def root
super || (parent && parent.root)
end