diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-09-02 07:56:44 +0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-09-02 21:40:14 +0400 |
commit | 40d619107f9027a33eccc01afa120f7b588e5cf9 (patch) | |
tree | 979032e5d9251962f697ab2671f77a7f0bc2327f /app/decorators | |
parent | 8db2a59d0b6959a78ea7be4663dd9a858dff9f98 (diff) |
Add link_title to CommitDecorator
Diffstat (limited to 'app/decorators')
-rw-r--r-- | app/decorators/commit_decorator.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/decorators/commit_decorator.rb b/app/decorators/commit_decorator.rb index cc8fa97587b..074176ae802 100644 --- a/app/decorators/commit_decorator.rb +++ b/app/decorators/commit_decorator.rb @@ -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. |