Skip to content
Snippets Groups Projects
Commit ff40b7de authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Add CommitDecorator#short_id

parent 8b7e404b
No related branches found
No related tags found
2 merge requests!1130Break up links with nested formating,!1127Use CommitDecorator more
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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment