Fixed: Commit message encoding error
This commit is contained in:
parent
ba8048d710
commit
016012b145
10 changed files with 24 additions and 20 deletions
9
lib/commit_ext.rb
Normal file
9
lib/commit_ext.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue