put redundant code at jbuilder partials