This commit is contained in:
gitlabhq 2011-10-24 22:38:03 +03:00
parent 61e6751ea6
commit 5baa5fad0a
8 changed files with 18 additions and 14 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