add id and code to jbuilder view