Last active
August 29, 2015 14:14
-
-
Save stephenmckinney/e422ece6264be301058e to your computer and use it in GitHub Desktop.
Vox.com Card Stacks fix
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
# 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