Skip to content

Instantly share code, notes, and snippets.

@IanWhitney
Created September 15, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanWhitney/ed4117fd17e5b95e0ad1 to your computer and use it in GitHub Desktop.
Save IanWhitney/ed4117fd17e5b95e0ad1 to your computer and use it in GitHub Desktop.
delete a Receipt's facets
receipt_id = _your_receipt_id_
r = Etl::Receipt.find(receipt_id)
r.audits.each do |a|
Etl::Audit::Facet.all_classes.each do |f|
f.where(etl_audit_id: a.id).delete_all
end
end
s = Etl::Service.new(r)
s.extract_facets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment