From 4ae30ce7fd05ec9b603c5040c23ad0aea642652a Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sun, 4 Dec 2011 20:48:03 -0200 Subject: [PATCH] Pass explicit length parameter to truncate --- app/helpers/content_viewer_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/content_viewer_helper.rb b/app/helpers/content_viewer_helper.rb index 1cc3afa..524aa53 100644 --- a/app/helpers/content_viewer_helper.rb +++ b/app/helpers/content_viewer_helper.rb @@ -55,7 +55,7 @@ module ContentViewerHelper "http://www.facebook.com/sharer.php?s=100&p[title]=%{title}&p[summary]=%{summary}&p[url]=%{url}&p[images][0]=%{image}" % { :title => CGI.escape(article.title), :url => CGI.escape(url_for(article.url)), - :summary => CGI.escape(truncate(strip_tags(article.body.to_s), 300)), + :summary => CGI.escape(truncate(strip_tags(article.body.to_s), :length => 300)), :image => CGI.escape(article.body_images_paths.first.to_s) } end -- libgit2 0.21.2