If I add the following line to my customer model:
errors.add(:shipping_address_postcode, “has invalid format”) unless
:shipping_address_postcode =~ /[0-9]*/
I get an error when trying to save a record:
undefined local variable or method `errors’ for Customer:Class
I got this example from the Agile book. Anyone know what I’ve missed?