[rspec-users] Database.truncate_all

Mark Wilden mark at mwilden.com
Sat Dec 6 12:13:13 EST 2008

On Sat, Dec 6, 2008 at 2:47 AM, David Salgado <david at digitalronin.com>wrote:

> ISTR that "destroy_all" will instantiate each object, before
> destroying it. If you just want to clean the database, I think
> "delete_all" is the one you want (it just does a "delete from
> [table]", if memory serves), and should be a lot quicker.

Yes, you're right. I always get those mixed up.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081206/a6eb38a0/attachment.html>

More information about the rspec-users mailing list