Class: DatabaseCleaner::ActiveRecord::Truncation

Inherits:
TruncationBase show all
Defined in:
lib/database_cleaner/active_record/truncation.rb

Instance Method Summary collapse

Methods inherited from TruncationBase

#initialize, #start

Constructor Details

This class inherits a constructor from DatabaseCleaner::TruncationBase

Instance Method Details

#cleanObject



43
44
45
46
47
48
49
# File 'lib/database_cleaner/active_record/truncation.rb', line 43

def clean
  connection.disable_referential_integrity do
    tables_to_truncate.each do |table_name|
      connection.truncate_table table_name
    end
  end
end