Mercurial > rsstweet
comparison app/helpers/application_helper.rb @ 80:448a368f7344
More useful title?
author | nanaya <me@myconan.net> |
---|---|
date | Sun, 26 Jun 2016 18:18:54 +0900 |
parents | 207917e41964 |
children | f91e2d00f03f |
comparison
equal
deleted
inserted
replaced
79:04ccd0632a71 | 80:448a368f7344 |
---|---|
1 module ApplicationHelper | 1 module ApplicationHelper |
2 include Twitter::Autolink | 2 include Twitter::Autolink |
3 | |
4 def ellipsize(text, limit = 60) | |
5 if text.length <= limit | |
6 text | |
7 else | |
8 "#{text.first(limit)}..." | |
9 end | |
10 end | |
3 end | 11 end |