rewrites #root method as ActiveRecord association

root can be now preloaded in ActiveRecord search query