I added a migration that adds data with a model class, calling create(). Validation in the model class fails, so the rows aren't being added to the database. But when I run 'rake db:migrate', it says nothing about the failures, causing me frustration when rake looks like it worked, but the data doesn't get loaded. I'm new to rails; is there something I'm missing about getting rake (or a migration, at least) to display its errors the same way that rails does (at least via the scaffold)? Thanks, Dave
on 2007-07-11 18:54
on 2007-07-11 19:02
try using create! which will raise an exception if the record is invalid.
on 2007-07-11 19:29
Chris Hall wrote: > try using create! which will raise an exception if the record is > invalid. Awesome, that's exactly what I want to see. Thanks, Dave