Method: Mongoid::Config#truncate!
- Defined in:
- lib/mongoid/config.rb
permalink #truncate! ⇒ true
Note:
This will be slower than purge!
Truncate all data in all collections, but not the indexes.
193 194 195 196 197 |
# File 'lib/mongoid/config.rb', line 193 def truncate! Sessions.default.collections.each do |collection| collection.find.remove_all end and true end |