All ordinances passed by the legislative body of any city or town shall be recorded in a book to be kept for that purpose by the city or town clerk, and when so recorded the record thereof so made shall be received in any court of the state as prima facie evidence of the due passage of such ordinance as recorded. When the ordinances of any city or town are printed by authority of such municipal corporation, the printed copies thereof shall be received as prima facie evidence that such ordinances as printed and published were duly passed.