Add link_title to CommitDecorator
This commit is contained in:
parent
8db2a59d0b
commit
40d619107f
2 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,15 @@
|
|||
class CommitDecorator < ApplicationDecorator
|
||||
decorates :commit
|
||||
|
||||
# Returns a string describing the commit for use in a link title
|
||||
#
|
||||
# Example
|
||||
#
|
||||
# "Commit: Alex Denisov - Project git clone panel"
|
||||
def link_title
|
||||
"Commit: #{author_name} - #{title}"
|
||||
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