validates_presence_ofdoesn't validate itself. If for some lunatic reason you're up and writing code at 8:26 AM, and you make a standard brain-lacks-coffee error like asking a model to validate the presence of some attribute it doesn't actually even have, the model will go ahead and validate against that missing attribute - preventing you from saving anything.
Friday, November 16, 2007
validates_presence_of: Ironic Little Rails Gotcha
Posted by Giles Bowkett at 8:25 AM