Last active
July 3, 2024 21:54
-
-
Save e10a/498b05361b3470895310cd2e0a915089 to your computer and use it in GitHub Desktop.
Roxy - delete Communication Preference
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
CommunicationPreference.where(contactable_id: c.id).destroy_all | |
# loop | |
cids = Customer.active.last(100).pluck(:id) | |
cids.select {|id| CommunicationPreference.where(contactable_id: id).destroy_all} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment