Skip to content

Instantly share code, notes, and snippets.

@torsday
Created November 4, 2014 19:21
Show Gist options
  • Save torsday/fda041c8f7de7778b5da to your computer and use it in GitHub Desktop.
Save torsday/fda041c8f7de7778b5da to your computer and use it in GitHub Desktop.
handout select for cheaters
@student_handouts = student_handouts_unfiltered.select { |sh| sh.title !~ /guide/i }
puts "X__" * 64
@student_handouts.each {|x| puts "#{x.title}"}
puts "X__" * 64
@torsday
Copy link
Author

torsday commented Nov 4, 2014

The above is the code that should filter out any handouts w/ the word "guide" in the title. The console shows

X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X_
Material 1
Material 2
Material 3
yo!
X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X__X_

And yet the handouts shown include the one titled with "guide" in it. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment