diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-26 13:56:42 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-26 13:59:47 -0300 |
commit | eedc513503785490a7caed23cd0a0aef3536759f (patch) | |
tree | 90bf8de637f333f3d5df0aee22e46cdcef50e523 /actionpack/lib/action_view/helpers | |
parent | 4ce3b5d6fe6451a7e6951f366d3e3f9324f75fdb (diff) | |
download | rails-eedc513503785490a7caed23cd0a0aef3536759f.tar.gz rails-eedc513503785490a7caed23cd0a0aef3536759f.tar.bz2 rails-eedc513503785490a7caed23cd0a0aef3536759f.zip |
Update the documentation and add CHANGELOG entry
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 73c3c61a41..72f9dd2cef 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -62,9 +62,9 @@ module ActionView # # Pass a <tt>:separator</tt> to truncate +text+ at a natural break. # - # The result is not marked as HTML-safe, so will be subject to the default escaping when - # used in views, unless wrapped by <tt>raw()</tt>. Care should be taken if +text+ contains HTML tags - # or entities, because truncation may produce invalid HTML (such as unbalanced or incomplete tags). + # Pass a block if you want to show extra content when the text is truncated. + # + # The result is marked as HTML-safe, but the it is escaped first. # # truncate("Once upon a time in a world far far away") # # => "Once upon a time in a world..." |