Sorted bases on index page by branch using by_branch method in model