Hi, First of all i don't know if am at the right place for this.

Second i don't know if this should be part of the rails framework at all. 

So this is what happens

Today I deployed a new staging version of an RoR app, then a user came over 
to me and said there was some functionality not working for him, it did for 
me...

As it turned out, i extended some validation on some models with a few 
obscure cases. It turned out these cases did already happen in the wild.

When I thought about this, i wonder if there was anyway to check of my 
current models matched the current data in the DB and if they were failed. 
There is a real possibility that when you change validation your current 
data turns out to be 'corrupt'.

So I looked around and found some scripts to run over every object and do a 
obj.valid? and report the results.

Shouldn't this be part of the default framework? Just like rake db:migrate 
or rake db:setup?

I suggested adding:
rake db:validate

examples:

   - http://blog.hasmanythrough.com/2006/8/27/validate-all-your-records(doesnt 
work in 3.x) 
   - 
   
http://justaddwater.dk/2010/02/07/rake-task-to-validate-all-items-on-all-models/
 
   - https://gist.github.com/xhoy/6510171 Working on rails 3.2.x 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to