Commit f120e5a8 authored by Riyad Preukschas's avatar Riyad Preukschas

Use shorthand as in TreeController#edit

parent 3304262c
...@@ -51,7 +51,7 @@ module Gitlab ...@@ -51,7 +51,7 @@ module Gitlab
protected protected
def can_edit?(path, last_commit) def can_edit?(path, last_commit)
current_last_commit = @project.commits(ref, path, 1).first.sha current_last_commit = @project.last_commit_for(ref, path).sha
last_commit == current_last_commit last_commit == current_last_commit
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment