Browse Source

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
tags/2.5.0
Toshi MARUYAMA 10 years ago
parent
commit
3e38bd0654
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/helpers/application_helper.rb

+ 3
- 3
app/helpers/application_helper.rb View File

@@ -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]

Loading…
Cancel
Save