diff options
author | gitlabhq <m@gitlabhq.com> | 2011-10-24 23:38:03 +0400 |
---|---|---|
committer | gitlabhq <m@gitlabhq.com> | 2011-10-24 23:38:03 +0400 |
commit | 5baa5fad0a1c6e2b8790f07f62c088fd505406d9 (patch) | |
tree | 80e5fe5e9de9c31089543a4970aa3bed625643f0 /lib | |
parent | 61e6751ea676d23f5ef88de6d0bf9c273f785516 (diff) |
Issue #149
Diffstat (limited to 'lib')
-rw-r--r-- | lib/commit_ext.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb new file mode 100644 index 00000000000..c175fa0cc2d --- /dev/null +++ b/lib/commit_ext.rb @@ -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 |