diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-06 03:33:51 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-06 03:33:51 +0000 |
commit | 3e38bd06543667436d0645b2d4be9f87f1d240e5 (patch) | |
tree | 91cd6004c82a0e3b167da4b14d2ddd6c2db404f8 /app | |
parent | ae7a4b9678dedbdfae0c62d9cc84667ef7388866 (diff) | |
download | redmine-3e38bd06543667436d0645b2d4be9f87f1d240e5.tar.gz redmine-3e38bd06543667436d0645b2d4be9f87f1d240e5.zip |
Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#link_to_issue
git-svn-id: http://svn.redmine.org/redmine/trunk@12831 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e2e3349ed..e4e929717 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -72,11 +72,11 @@ module ApplicationHelper subject = nil text = options[:tracker] == false ? "##{issue.id}" : "#{issue.tracker} ##{issue.id}" if options[:subject] == false - title = truncate(issue.subject, :length => 60) + title = issue.subject.truncate(60) else subject = issue.subject - if options[:truncate] - subject = truncate(subject, :length => options[:truncate]) + if truncate_length = options[:truncate] + subject = subject.truncate(truncate_length) end end only_path = options[:only_path].nil? ? true : options[:only_path] |