I'd recommend using active_model_serializers gem instead of jbuilder.