Fixed: Commit message encoding error

This commit is contained in:
Dmitriy Zaporozhets 2011-10-24 22:47:53 +03:00
parent ba8048d710
commit 016012b145
10 changed files with 24 additions and 20 deletions

9
lib/commit_ext.rb Normal file
View file

@ -0,0 +1,9 @@
module CommitExt
# Cause of encoding rails truncate raise error
# this method is temporary decision
def truncated_message(size = 80)
message.length > size ? (message[0..(size - 1)] + "...") : message
rescue
"-- invalid encoding for commit message"
end
end