commit.short_id as model method. Styled inline comment form

This commit is contained in:
randx 2012-07-27 11:22:05 +03:00
parent 67ef96ea5f
commit 0590aa9d60
7 changed files with 46 additions and 23 deletions

View file

@ -1,10 +1,6 @@
class CommitDecorator < ApplicationDecorator
decorates :commit
def short_id(length = 10)
id.to_s[0..length]
end
# Returns the commits title.
#
# Usually, the commit title is the first line of the commit message.