# File lib/deltacloud/helpers/application_helper.rb, line 201 def truncate_words(text, length = 10) return nil unless text return text if text.length<=length end_string = "...#{text[(text.length-(length/2))..text.length]}" "#{text[0..(length/2)]}#{end_string}" end