Remove multiple spaces and new lines inside of String
check out Rails squish
method:
http://apidock.com/rails/String/squish
To illustrate Rubys built in squeeze:
string.gsub("\n", ' ').squeeze(' ')
check out Rails squish
method:
http://apidock.com/rails/String/squish
To illustrate Rubys built in squeeze:
string.gsub("\n", ' ').squeeze(' ')