Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ar_truncator/active_record/base.rb

Class Method Summary collapse

Class Method Details

.truncateObject



4
5
6
7
# File 'lib/ar_truncator/active_record/base.rb', line 4

def truncate
  statement = "TRUNCATE table #{self.table_name}"
  self.connection.execute(statement)
end