comparison app/helpers/application_helper.rb @ 82:f91e2d00f03f

Reduce title length limit
author nanaya <me@myconan.net>
date Sun, 26 Jun 2016 18:22:05 +0900
parents 448a368f7344
children 0c8a8b390145
comparison
equal deleted inserted replaced
81:fe5ea9b86091 82:f91e2d00f03f
1 module ApplicationHelper 1 module ApplicationHelper
2 include Twitter::Autolink 2 include Twitter::Autolink
3 3
4 def ellipsize(text, limit = 60) 4 def ellipsize(text, limit = 30)
5 if text.length <= limit 5 if text.length <= limit
6 text 6 text
7 else 7 else
8 "#{text.first(limit)}..." 8 "#{text.first(limit)}..."
9 end 9 end