A municipality may borrow money in anticipation of the sale of general obligation and revenue bonds if
(1) the general obligation bonds to be sold have been authorized by ordinance and ratified by a majority vote at an election;
(2) the revenue bonds to be sold have been authorized by ordinance.