Use shorthand as in TreeController#edit

This commit is contained in:
Riyad Preukschas 2012-10-15 21:23:35 +02:00
parent 3304262c3d
commit f120e5a89a

View file

@ -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