Created
September 15, 2015 14:07
-
-
Save IanWhitney/ed4117fd17e5b95e0ad1 to your computer and use it in GitHub Desktop.
delete a Receipt's facets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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