Last active
September 26, 2017 19:16
-
-
Save richiethomas/ddf00c4aa11a1a93af1bbcb0e22c202a to your computer and use it in GitHub Desktop.
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
items = LineItem.unscoped.where(reference_type: 'packaging').by_facility('AR').where.not(archived_at: nil) | |
items.update_attributes(archived_at: nil) | |
PurchaseOrder.unscoped.find(items.pluck(:purchase_order_id)).update_attributes(archived_at: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment