No county, city, or other municipal corporation shall hereafter become a subscriber to the capital of any private corporation or association, or make any appropriation or donation to the same, or in anywise loan its credit; but this shall not be construed to in any way affect any obligation heretofore undertaken pursuant to law or to prevent a county, city, or other municipal corporation from investing its funds as authorized by law.