Friday, 12 February 2010

Rails: NoMethodError if validation fails

This sometimes happens if you load objects in the edit method, but don't load the same objects in the update - if the validation fails, the view is generated by update, and the objects aren't there.