summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-12-24 16:26:52 -0500
committerRobert Speicher <rspeicher@gmail.com>2015-12-24 16:26:52 -0500
commitc6d25083626c9a97a0ae442298b59c2ff9351f3a (patch)
tree0c6ac8026e8af2a4572400c9fc0a5dfaf7c7da29 /app/helpers
parent5a3b9c97e34ee69312ef9bcf575894a106c5a271 (diff)
downloadgitlab-ce-c6d25083626c9a97a0ae442298b59c2ff9351f3a.tar.gz
Truncate page_description to 30 words
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/page_layout_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb
index c4eb09bea2b..4f1276f93ec 100644
--- a/app/helpers/page_layout_helper.rb
+++ b/app/helpers/page_layout_helper.rb
@@ -30,9 +30,9 @@ module PageLayoutHelper
@page_description ||= page_description_default
if description.present?
- @page_description = description
+ @page_description = description.squish
else
- sanitize(@page_description.squish, tags: [])
+ sanitize(@page_description, tags: []).truncate_words(30)
end
end