Skip to content

Instantly share code, notes, and snippets.

@e10a
Last active July 3, 2024 21:54
Show Gist options
  • Save e10a/498b05361b3470895310cd2e0a915089 to your computer and use it in GitHub Desktop.
Save e10a/498b05361b3470895310cd2e0a915089 to your computer and use it in GitHub Desktop.
Roxy - delete Communication Preference
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