There's no documentation for this item.
Source Code
# File action_view/helpers/text_helper.rb, line 57 def truncate(text, length = 30, truncate_string = "...") #:nodoc: if text l = length - truncate_string.length (text.length > length ? text[0...l] + truncate_string : text).to_s end end
<code/>and<pre/>for code samples.