Building index method of products controller plus tests