Use Commit#show instead of Commits#show to view a single commit

Commits#show (plural) is going to be for showing commit history on a
specific path.
This commit is contained in:
Robert Speicher 2012-09-17 10:06:56 -04:00
parent a21abce94f
commit b389247c02
10 changed files with 40 additions and 28 deletions

View file

@ -26,25 +26,25 @@ class CommitsController < ApplicationController
end
end
def show
result = CommitLoad.new(project, current_user, params).execute
# def show
# result = CommitLoad.new(project, current_user, params).execute
@commit = result[:commit]
# @commit = result[:commit]
if @commit
@suppress_diff = result[:suppress_diff]
@note = result[:note]
@line_notes = result[:line_notes]
@notes_count = result[:notes_count]
@comments_allowed = true
else
return git_not_found!
end
# if @commit
# @suppress_diff = result[:suppress_diff]
# @note = result[:note]
# @line_notes = result[:line_notes]
# @notes_count = result[:notes_count]
# @comments_allowed = true
# else
# return git_not_found!
# end
if result[:status] == :huge_commit
render "huge_commit" and return
end
end
# if result[:status] == :huge_commit
# render "huge_commit" and return
# end
# end
def compare
result = Commit.compare(project, params[:from], params[:to])