lib/brillo/scrubber.rb in brillo-1.3.0 vs lib/brillo/scrubber.rb in brillo-1.3.1.pre1
- old
+ new
@@ -72,11 +72,13 @@
end
def explore_class(klass, tactic_or_ids, associations)
ids = tactic_or_ids.is_a?(Symbol) ? TACTICS.fetch(tactic_or_ids).call(klass) : tactic_or_ids
logger.info("Scrubbing #{ids.length} #{klass} rows with associations #{associations}")
- Polo.explore(klass, ids, associations).each do |row|
- yield "#{row};"
+ ActiveRecord::Base.connection.uncached do
+ Polo.explore(klass, ids, associations).each do |row|
+ yield "#{row};"
+ end
end
end
def klass_association_map
config.klass_association_map