Skip to content

Instantly share code, notes, and snippets.

@rramsden
Created April 13, 2011 00:10
Show Gist options
  • Save rramsden/916721 to your computer and use it in GitHub Desktop.
Save rramsden/916721 to your computer and use it in GitHub Desktop.
copy_from = Partner.find_by_name("SomePartner")
partners = Partner.all - [copy_from]
partners.each do |partner|
copy_from.blacklists.each{|x| y = x.clone; y.partner_id = partner.id; }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment