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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ef5c16af
Commit
ef5c16af
authored
Aug 20, 2021
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Compare#to_param
parent
bde04273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
app/models/compare.rb
app/models/compare.rb
+10
-0
No files found.
app/models/compare.rb
View file @
ef5c16af
...
...
@@ -25,6 +25,16 @@ class Compare
@straight
=
straight
end
# Return a Hash of parameters for passing to a URL helper
#
# See `namespace_project_compare_url`
def
to_param
{
from:
@straight
?
start_commit_sha
:
base_commit_sha
,
to:
head_commit_sha
}
end
def
cache_key
[
@project
,
:compare
,
diff_refs
.
hash
]
end
...
...
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