Update text_helper.rb

a more comprehensive solution