Created
January 14, 2019 20:05
-
-
Save ashleymason/2f8f15faee06557877eaed3d78c670d0 to your computer and use it in GitHub Desktop.
admin-approve all new luxpo campaigns
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
partner = Partner[:luxpo] | |
Campaign.joins(:campaign_insertion_order). | |
where(campaigns: { | |
partner_id: partner.id, | |
status: :pending_approval, | |
} | |
). | |
where(campaign_insertion_orders: { source: 'feed_automation'}). | |
find_each do |c| | |
c.update(site_approved_at: Time.now) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment