This works for any lines with spaces in them.
str.downcase.tr!(" ", "_")
but lines that do not have spaces are simply deleted
So, "New School" will change to "new_school", but the "color" will be "", nothing!
ruby ruby-on-rails ruby-on-rails-3
rugbert Sep 25 '11 at 17:01 2011-09-25 17:01
source share