Class: DatabaseCleaner::ActiveRecord::Truncation
- Inherits:
-
Object
- Object
- DatabaseCleaner::ActiveRecord::Truncation
- Includes:
- Base, Generic::Truncation
- Defined in:
- lib/database_cleaner/active_record/truncation.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from Generic::Truncation
Methods included from Base
#connection_klass, #create_connection_klass, #db, #db=, #load_config
Methods included from Generic::Base
Instance Method Details
#clean ⇒ Object
104 105 106 107 108 109 110 |
# File 'lib/database_cleaner/active_record/truncation.rb', line 104 def clean connection.disable_referential_integrity do tables_to_truncate.each do |table_name| connection.truncate_table table_name end end end |