Fix n + 1 queries problem in jbuilder