Commit 8c8892460678471db1fce5129a0c2c7dd18f3b38
1 parent
bcf55312
Exists in
master
and in
4 other branches
fix #132
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
app/helpers/commits_helper.rb
@@ -22,10 +22,12 @@ module CommitsHelper | @@ -22,10 +22,12 @@ module CommitsHelper | ||
22 | :remote => true, :class => "lite_button vm", :style => "text-align:center; width:930px; ", :id => "more-commits-link" | 22 | :remote => true, :class => "lite_button vm", :style => "text-align:center; width:930px; ", :id => "more-commits-link" |
23 | end | 23 | end |
24 | 24 | ||
25 | + # Cause some errors with trucate & encoding use this method | ||
25 | def truncate_commit_message(commit, size = 60) | 26 | def truncate_commit_message(commit, size = 60) |
26 | - truncate(commit.message, :length => size) | 27 | + message = commit.message |
28 | + message.length > size ? (message[0..(size - 1)] + "...") : message | ||
27 | # if special characters occurs | 29 | # if special characters occurs |
28 | rescue | 30 | rescue |
29 | - commit.message.length > size ? (commit.message[0..(size - 1)] + "...") : commit.message | 31 | + commit.message |
30 | end | 32 | end |
31 | end | 33 | end |