-
Notifications
You must be signed in to change notification settings - Fork 0
Adds a truncate class method to ActiveRecord which deletes all records and resets the autoincrement ID
simon-engledew/truncate-active-record
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Truncate Active Record ====================== Opens up the SQLite3 connection adapter and adds a truncate method which behaves similarly to the SQL truncate command, deleting all records in the database and resetting the auto-increment ID. Returns the number of deleted records. Example ======= Post.truncate => 4 Copyright (c) 2008 Simon Engledew, released under the MIT license
About
Adds a truncate class method to ActiveRecord which deletes all records and resets the autoincrement ID
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published