Created
July 7, 2012 17:20
-
-
Save lucas-clemente/3067248 to your computer and use it in GitHub Desktop.
Validate all rows in a rails database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir['app/models/*.rb'].map {|f| File.basename(f, '.*').camelize.constantize }.map { |c| {c.name => c.all.select {|f| f.invalid?}.map {|f| f.errors}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment