Commit 756b9b59 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix #132

parent 9de8e52d
...@@ -22,10 +22,12 @@ module CommitsHelper ...@@ -22,10 +22,12 @@ module CommitsHelper
:remote => true, :class => "lite_button vm", :style => "text-align:center; width:930px; ", :id => "more-commits-link" :remote => true, :class => "lite_button vm", :style => "text-align:center; width:930px; ", :id => "more-commits-link"
end end
# Cause some errors with trucate & encoding use this method
def truncate_commit_message(commit, size = 60) def truncate_commit_message(commit, size = 60)
truncate(commit.message, :length => size) message = commit.message
message.length > size ? (message[0..(size - 1)] + "...") : message
# if special characters occurs # if special characters occurs
rescue rescue
commit.message.length > size ? (commit.message[0..(size - 1)] + "...") : commit.message commit.message
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment