Created
April 6, 2012 13:06
-
-
Save dennismonsewicz/2319588 to your computer and use it in GitHub Desktop.
Easy way to run delete_all on all database tables when running a seed file
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"].each do |file| | |
File.basename(file, ".rb").capitalize.delete_all | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment