if object.save head :ok else render json: { errors: object.errors }, status: :unprocessable_entity end