oneclickorgs / one-click-orgs

Create legal organisations with just one click
http://oneclickorgs.com/
GNU Affero General Public License v3.0
45 stars 13 forks source link

Don't error if financial year end is inputted in the wrong format #468

Open chrismear opened 10 years ago

chrismear commented 10 years ago

A TypeError occurred in registration_forms#show: can't convert nil into Integer app/models/registration_form.rb:65:in `%'

chrismear commented 10 years ago

This occurs because we are assuming the user has entered a financial year-end date in the format dd/mm/yyyy, and the code does not fail gracefully if they have entered it in a different format.

Ideally, we should be using a date select input that forces the correct format, or at the very least be validating the format before it gets saved into the database.