Commit 4ae30ce7fd05ec9b603c5040c23ad0aea642652a
1 parent
201b739b
Exists in
master
and in
29 other branches
Pass explicit length parameter to truncate
This removes several warnings during unit tests.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/helpers/content_viewer_helper.rb
... | ... | @@ -55,7 +55,7 @@ module ContentViewerHelper |
55 | 55 | "http://www.facebook.com/sharer.php?s=100&p[title]=%{title}&p[summary]=%{summary}&p[url]=%{url}&p[images][0]=%{image}" % { |
56 | 56 | :title => CGI.escape(article.title), |
57 | 57 | :url => CGI.escape(url_for(article.url)), |
58 | - :summary => CGI.escape(truncate(strip_tags(article.body.to_s), 300)), | |
58 | + :summary => CGI.escape(truncate(strip_tags(article.body.to_s), :length => 300)), | |
59 | 59 | :image => CGI.escape(article.body_images_paths.first.to_s) |
60 | 60 | } |
61 | 61 | end | ... | ... |