commit.short_id as model method. Styled inline comment form
This commit is contained in:
parent
67ef96ea5f
commit
0590aa9d60
7 changed files with 46 additions and 23 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue