Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ff40b7de
Commit
ff40b7de
authored
Jul 21, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CommitDecorator#short_id
parent
8b7e404b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
app/decorators/commit_decorator.rb
app/decorators/commit_decorator.rb
+4
-0
No files found.
app/decorators/commit_decorator.rb
View file @
ff40b7de
class
CommitDecorator
<
ApplicationDecorator
class
CommitDecorator
<
ApplicationDecorator
decorates
:commit
decorates
:commit
def
short_id
(
length
=
10
)
id
.
to_s
[
0
..
length
]
end
# Returns the commits title.
# Returns the commits title.
#
#
# Usually, the commit title is the first line of the commit message.
# Usually, the commit title is the first line of the commit message.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment