Skip to content

Instantly share code, notes, and snippets.

@stephenmckinney
Last active August 29, 2015 14:14
Show Gist options
  • Save stephenmckinney/e422ece6264be301058e to your computer and use it in GitHub Desktop.
Save stephenmckinney/e422ece6264be301058e to your computer and use it in GitHub Desktop.
Vox.com Card Stacks fix
# Run using: bundle exec rails runner cards_fix.rb
current_community = Network.vox.communities.first
card_stacks = ExplainerGroup.published_on_community(current_community)
card_stacks.each do |card_stack|
explainer_group = card_stack.hub_page.entry_group
cards = explainer_group.all_explainer_cards
cards.each do |card|
card.explainer_groups << explainer_group
card.save!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment