def truncate(str, len = 80)
      if str and str.length > len and (add = str[len..-1].index(' '))
        str = str[0, len + add] + '&#8230;'
      end
      str
    end
def truncate(str, len = 80)
      if str and str.length > len and (add = str[len..-1].index(' '))
        str = str[0, len + add] + '&#8230;'
      end
      str
    end
truncates the string at the first space after +len+ characters