How do I remove a substring after a certain character in a string using Ruby?
new_str = str.slice(0..(str.index('blah')))