Skip to content

Instantly share code, notes, and snippets.

@davidray
Last active February 12, 2018 15:19
Show Gist options
  • Save davidray/d0c7804811a5c397d300be66bcfa2582 to your computer and use it in GitHub Desktop.
Save davidray/d0c7804811a5c397d300be66bcfa2582 to your computer and use it in GitHub Desktop.
Update programs for 2018
# https://execonline.leankit.com/card/615293384
ids = [163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206]
# https://execonline.leankit.com/card/615293024
ids << 154
# This template uses the CSS we need
css = ::ContentLibrary::CourseTemplate.find(13).overview_segment_css
# Make sure all programs are there
ids.count
::Organizations::Program.where(id: ids).count
# Update the css used by the IWS program
::Organizations::Program.where(id: ids).update_all({overview_segment_css: css})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment