Sha256: 99d670306ba4565387ec7f626b8bd863fd6999d5fca9e357ce155261d5e5f67d
Contents?: true
Size: 550 Bytes
Versions: 28
Compression:
Stored size: 550 Bytes
Contents
module Imports module Rollback def rollback_orders Order.where(:import_id => self.id).where(:organization_id => self.organization.id).all.each {|o| o.destroy(:with_prejudice => true)} end def rollback_people Rails.logger.debug "ROLLING BACK PEOPLE" Person.where(:import_id => self.id).where(:organization_id => self.organization.id).all.each do |p| Rails.logger.debug "Destroying [#{p.id}]" result = p.destroy(:with_prejudice => true) Rails.logger.debug result end end end end
Version data entries
28 entries across 28 versions & 1 rubygems