Skip to content

Commit 52affa8

Browse files
Fix example output for truncate helper [ci-skip]
The previous output was incorrect for the default truncation length, and it included unescaped quotes.
1 parent c05d8ed commit 52affa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionview/lib/action_view/helpers/text_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def safe_concat(string)
118118
# # => "<p>Once upon a time in a wo..."
119119
#
120120
# truncate("Once upon a time in a world far far away") { link_to "Continue", "#" }
121-
# # => "Once upon a time in a wo...<a href="#">Continue</a>"
121+
# # => "Once upon a time in a world...<a href=\"#\">Continue</a>"
122122
def truncate(text, options = {}, &block)
123123
if text
124124
length = options.fetch(:length, 30)

0 commit comments

Comments
 (0)