Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#format_activity_description
git-svn-id: http://svn.redmine.org/redmine/trunk@12835 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
16211f9a5b
commit
8934e790fe
|
@ -232,7 +232,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def format_activity_description(text)
|
||||
h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')
|
||||
h(text.to_s.truncate(120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')
|
||||
).gsub(/[\r\n]+/, "<br />").html_safe
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue